@solana/transactions 2.0.0-experimental.0f3404a → 2.0.0-experimental.109615d

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.
@@ -1,6 +1,6 @@
1
- import { IDurableNonceTransaction } from './durable-nonce';
2
- import { ITransactionWithSignatures } from './signatures';
3
- import { BaseTransaction } from './types';
1
+ import { IDurableNonceTransaction } from './durable-nonce.js';
2
+ import { ITransactionWithSignatures } from './signatures.js';
3
+ import { BaseTransaction } from './types.js';
4
4
  export type Blockhash = string & {
5
5
  readonly __brand: unique symbol;
6
6
  };
@@ -1,7 +1,7 @@
1
1
  import { IInstruction } from '@solana/instructions';
2
- import { ITransactionWithBlockhashLifetime } from './blockhash';
3
- import { IDurableNonceTransaction } from './durable-nonce';
4
- import { ITransactionWithFeePayer } from './fee-payer';
5
- import { BaseTransaction, TransactionVersion } from './types';
2
+ import { ITransactionWithBlockhashLifetime } from './blockhash.js';
3
+ import { IDurableNonceTransaction } from './durable-nonce.js';
4
+ import { ITransactionWithFeePayer } from './fee-payer.js';
5
+ import { BaseTransaction, TransactionVersion } from './types.js';
6
6
  export type CompilableTransaction<TVersion extends TransactionVersion = TransactionVersion, TInstruction extends IInstruction = IInstruction> = BaseTransaction<TVersion, TInstruction> & ITransactionWithFeePayer & (ITransactionWithBlockhashLifetime | IDurableNonceTransaction);
7
7
  //# sourceMappingURL=compilable-transaction.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { Address } from '@solana/addresses';
2
- import { OrderedAccounts } from './accounts';
2
+ import { OrderedAccounts } from './accounts.js';
3
3
  type AddressTableLookup = Readonly<{
4
4
  lookupTableAddress: Address;
5
5
  readableIndices: readonly number[];
@@ -1,4 +1,4 @@
1
- import { OrderedAccounts } from './accounts';
1
+ import { OrderedAccounts } from './accounts.js';
2
2
  type MessageHeader = Readonly<{
3
3
  numReadonlyNonSignerAccounts: number;
4
4
  numReadonlySignerAccounts: number;
@@ -1,5 +1,5 @@
1
1
  import { IInstruction } from '@solana/instructions';
2
- import { OrderedAccounts } from './accounts';
2
+ import { OrderedAccounts } from './accounts.js';
3
3
  type CompiledInstruction = Readonly<{
4
4
  accountIndices?: number[];
5
5
  data?: Uint8Array;
@@ -1,3 +1,3 @@
1
- import { IDurableNonceTransaction, ITransactionWithBlockhashLifetime } from './index';
1
+ import { IDurableNonceTransaction, ITransactionWithBlockhashLifetime } from './index.js';
2
2
  export declare function getCompiledLifetimeToken(lifetimeConstraint: (ITransactionWithBlockhashLifetime | IDurableNonceTransaction)['lifetimeConstraint']): string;
3
3
  //# sourceMappingURL=compile-lifetime-token.d.ts.map
@@ -1,4 +1,4 @@
1
1
  import { Address } from '@solana/addresses';
2
- import { OrderedAccounts } from './accounts';
2
+ import { OrderedAccounts } from './accounts.js';
3
3
  export declare function getCompiledStaticAccounts(orderedAccounts: OrderedAccounts): Address[];
4
4
  //# sourceMappingURL=compile-static-accounts.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import { SignatureBytes } from '@solana/keys';
2
- import { CompilableTransaction } from './compilable-transaction';
3
- import { CompiledMessage } from './message';
4
- import { ITransactionWithSignatures } from './signatures';
2
+ import { CompilableTransaction } from './compilable-transaction.js';
3
+ import { CompiledMessage } from './message.js';
4
+ import { ITransactionWithSignatures } from './signatures.js';
5
5
  export type CompiledTransaction = Readonly<{
6
6
  compiledMessage: CompiledMessage;
7
7
  signatures: SignatureBytes[];
@@ -1,4 +1,4 @@
1
- import { Transaction, TransactionVersion } from './types';
1
+ import { Transaction, TransactionVersion } from './types.js';
2
2
  type TransactionConfig<TVersion extends TransactionVersion> = Readonly<{
3
3
  version: TVersion;
4
4
  }>;
@@ -1,5 +1,5 @@
1
- import { CompilableTransaction } from './compilable-transaction';
2
- import { CompiledTransaction } from './compile-transaction';
3
- import { ITransactionWithSignatures } from './signatures';
1
+ import { CompilableTransaction } from './compilable-transaction.js';
2
+ import { CompiledTransaction } from './compile-transaction.js';
3
+ import { ITransactionWithSignatures } from './signatures.js';
4
4
  export declare function decompileTransaction(compiledTransaction: CompiledTransaction, lastValidBlockHeight?: bigint): CompilableTransaction | (CompilableTransaction & ITransactionWithSignatures);
5
5
  //# sourceMappingURL=decompile-transaction.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import { Address } from '@solana/addresses';
2
2
  import { IInstruction, IInstructionWithAccounts, IInstructionWithData, ReadonlyAccount, ReadonlySignerAccount, WritableAccount, WritableSignerAccount } from '@solana/instructions';
3
- import { ITransactionWithSignatures } from './signatures';
4
- import { BaseTransaction } from './types';
3
+ import { ITransactionWithSignatures } from './signatures.js';
4
+ import { BaseTransaction } from './types.js';
5
5
  type AdvanceNonceAccountInstruction<TNonceAccountAddress extends string = string, TNonceAuthorityAddress extends string = string> = IInstruction<'11111111111111111111111111111111'> & IInstructionWithAccounts<readonly [
6
6
  WritableAccount<TNonceAccountAddress>,
7
7
  ReadonlyAccount<'SysvarRecentB1ockHashes11111111111111111111'>,
@@ -1,6 +1,6 @@
1
1
  import { Address } from '@solana/addresses';
2
- import { ITransactionWithSignatures } from './signatures';
3
- import { BaseTransaction } from './types';
2
+ import { ITransactionWithSignatures } from './signatures.js';
3
+ import { BaseTransaction } from './types.js';
4
4
  export interface ITransactionWithFeePayer<TAddress extends string = string> {
5
5
  readonly feePayer: Address<TAddress>;
6
6
  }
@@ -1,12 +1,12 @@
1
- export * from './blockhash';
2
- export * from './compilable-transaction';
3
- export * from './create-transaction';
4
- export * from './durable-nonce';
5
- export * from './fee-payer';
6
- export * from './instructions';
7
- export * from './message';
8
- export * from './serializers';
9
- export * from './signatures';
10
- export * from './types';
11
- export * from './wire-transaction';
1
+ export * from './blockhash.js';
2
+ export * from './compilable-transaction.js';
3
+ export * from './create-transaction.js';
4
+ export * from './durable-nonce.js';
5
+ export * from './fee-payer.js';
6
+ export * from './instructions.js';
7
+ export * from './message.js';
8
+ export * from './serializers/index.js';
9
+ export * from './signatures.js';
10
+ export * from './types.js';
11
+ export * from './wire-transaction.js';
12
12
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
- import { ITransactionWithSignatures } from './signatures';
2
- import { BaseTransaction } from './types';
1
+ import { ITransactionWithSignatures } from './signatures.js';
2
+ import { BaseTransaction } from './types.js';
3
3
  export declare function appendTransactionInstruction<TTransaction extends BaseTransaction>(instruction: TTransaction['instructions'][number], transaction: TTransaction | (TTransaction & ITransactionWithSignatures)): TTransaction | Omit<TTransaction, keyof ITransactionWithSignatures>;
4
4
  export declare function prependTransactionInstruction<TTransaction extends BaseTransaction>(instruction: TTransaction['instructions'][number], transaction: TTransaction | (TTransaction & ITransactionWithSignatures)): TTransaction | Omit<TTransaction, keyof ITransactionWithSignatures>;
5
5
  //# sourceMappingURL=instructions.d.ts.map
@@ -1,9 +1,9 @@
1
- import { CompilableTransaction } from './compilable-transaction';
2
- import { getCompiledAddressTableLookups } from './compile-address-table-lookups';
3
- import { getCompiledMessageHeader } from './compile-header';
4
- import { getCompiledInstructions } from './compile-instructions';
5
- import { getCompiledLifetimeToken } from './compile-lifetime-token';
6
- import { getCompiledStaticAccounts } from './compile-static-accounts';
1
+ import { CompilableTransaction } from './compilable-transaction.js';
2
+ import { getCompiledAddressTableLookups } from './compile-address-table-lookups.js';
3
+ import { getCompiledMessageHeader } from './compile-header.js';
4
+ import { getCompiledInstructions } from './compile-instructions.js';
5
+ import { getCompiledLifetimeToken } from './compile-lifetime-token.js';
6
+ import { getCompiledStaticAccounts } from './compile-static-accounts.js';
7
7
  type BaseCompiledMessage = Readonly<{
8
8
  header: ReturnType<typeof getCompiledMessageHeader>;
9
9
  instructions: ReturnType<typeof getCompiledInstructions>;
@@ -1,5 +1,5 @@
1
1
  import { type VariableSizeCodec, type VariableSizeDecoder, type VariableSizeEncoder } from '@solana/codecs-core';
2
- import type { getCompiledAddressTableLookups } from '../compile-address-table-lookups';
2
+ import type { getCompiledAddressTableLookups } from '../compile-address-table-lookups.js';
3
3
  type AddressTableLookup = ReturnType<typeof getCompiledAddressTableLookups>[number];
4
4
  export declare function getAddressTableLookupEncoder(): VariableSizeEncoder<AddressTableLookup>;
5
5
  export declare function getAddressTableLookupDecoder(): VariableSizeDecoder<AddressTableLookup>;
@@ -1,5 +1,5 @@
1
1
  import { FixedSizeCodec, FixedSizeDecoder, FixedSizeEncoder } from '@solana/codecs-core';
2
- import { getCompiledMessageHeader } from '../compile-header';
2
+ import { getCompiledMessageHeader } from '../compile-header.js';
3
3
  type MessageHeader = ReturnType<typeof getCompiledMessageHeader>;
4
4
  export declare function getMessageHeaderEncoder(): FixedSizeEncoder<MessageHeader, 3>;
5
5
  export declare function getMessageHeaderDecoder(): FixedSizeDecoder<MessageHeader, 3>;
@@ -1,3 +1,3 @@
1
- export * from './message';
2
- export * from './transaction';
1
+ export * from './message.js';
2
+ export * from './transaction.js';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { VariableSizeCodec, VariableSizeDecoder, VariableSizeEncoder } from '@solana/codecs-core';
2
- import { getCompiledInstructions } from '../compile-instructions';
2
+ import { getCompiledInstructions } from '../compile-instructions.js';
3
3
  type Instruction = ReturnType<typeof getCompiledInstructions>[number];
4
4
  export declare function getInstructionEncoder(): VariableSizeEncoder<Instruction>;
5
5
  export declare function getInstructionDecoder(): VariableSizeDecoder<Instruction>;
@@ -1,5 +1,5 @@
1
1
  import { VariableSizeCodec, VariableSizeDecoder, VariableSizeEncoder } from '@solana/codecs-core';
2
- import { CompiledMessage } from '../message';
2
+ import { CompiledMessage } from '../message.js';
3
3
  export declare function getCompiledMessageEncoder(): VariableSizeEncoder<CompiledMessage>;
4
4
  export declare function getCompiledMessageDecoder(): VariableSizeDecoder<CompiledMessage>;
5
5
  export declare function getCompiledMessageCodec(): VariableSizeCodec<CompiledMessage>;
@@ -1,5 +1,5 @@
1
1
  import { VariableSizeCodec, VariableSizeDecoder, VariableSizeEncoder } from '@solana/codecs-core';
2
- import { TransactionVersion } from '../types';
2
+ import { TransactionVersion } from '../types.js';
3
3
  export declare function getTransactionVersionEncoder(): VariableSizeEncoder<TransactionVersion>;
4
4
  export declare function getTransactionVersionDecoder(): VariableSizeDecoder<TransactionVersion>;
5
5
  export declare function getTransactionVersionCodec(): VariableSizeCodec<TransactionVersion>;
@@ -1,6 +1,6 @@
1
1
  import { VariableSizeCodec, VariableSizeDecoder, VariableSizeEncoder } from '@solana/codecs-core';
2
- import { CompilableTransaction } from '../compilable-transaction';
3
- import { ITransactionWithSignatures } from '../signatures';
2
+ import { CompilableTransaction } from '../compilable-transaction.js';
3
+ import { ITransactionWithSignatures } from '../signatures.js';
4
4
  export declare function getTransactionEncoder(): VariableSizeEncoder<CompilableTransaction | (CompilableTransaction & ITransactionWithSignatures)>;
5
5
  export declare function getTransactionDecoder(lastValidBlockHeight?: bigint): VariableSizeDecoder<CompilableTransaction | (CompilableTransaction & ITransactionWithSignatures)>;
6
6
  export declare function getTransactionCodec(lastValidBlockHeight?: bigint): VariableSizeCodec<CompilableTransaction | (CompilableTransaction & ITransactionWithSignatures)>;
@@ -1,7 +1,7 @@
1
1
  import { Address } from '@solana/addresses';
2
2
  import { Signature, SignatureBytes } from '@solana/keys';
3
- import { CompilableTransaction } from './compilable-transaction';
4
- import { ITransactionWithFeePayer } from './fee-payer';
3
+ import { CompilableTransaction } from './compilable-transaction.js';
4
+ import { ITransactionWithFeePayer } from './fee-payer.js';
5
5
  export interface IFullySignedTransaction extends ITransactionWithSignatures {
6
6
  readonly __brand: unique symbol;
7
7
  }
@@ -1,4 +1,4 @@
1
1
  import { ITransactionWithSignatures } from '.';
2
- import { BaseTransaction } from './types';
2
+ import { BaseTransaction } from './types.js';
3
3
  export declare function getUnsignedTransaction<TTransaction extends BaseTransaction>(transaction: TTransaction | (TTransaction & ITransactionWithSignatures)): TTransaction | Omit<TTransaction & ITransactionWithSignatures, keyof ITransactionWithSignatures>;
4
4
  //# sourceMappingURL=unsigned-transaction.d.ts.map
@@ -1,4 +1,4 @@
1
- import { getTransactionEncoder } from './serializers/transaction';
1
+ import { getTransactionEncoder } from './serializers/transaction.js';
2
2
  export type Base64EncodedWireTransaction = string & {
3
3
  readonly __brand: unique symbol;
4
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solana/transactions",
3
- "version": "2.0.0-experimental.0f3404a",
3
+ "version": "2.0.0-experimental.109615d",
4
4
  "description": "Helpers for creating and serializing transactions",
5
5
  "exports": {
6
6
  "browser": {
@@ -46,20 +46,20 @@
46
46
  "maintained node versions"
47
47
  ],
48
48
  "dependencies": {
49
- "@solana/addresses": "2.0.0-experimental.0f3404a",
50
- "@solana/codecs-core": "2.0.0-experimental.0f3404a",
51
- "@solana/codecs-data-structures": "2.0.0-experimental.0f3404a",
52
- "@solana/codecs-numbers": "2.0.0-experimental.0f3404a",
53
- "@solana/functional": "2.0.0-experimental.0f3404a",
54
- "@solana/codecs-strings": "2.0.0-experimental.0f3404a",
55
- "@solana/keys": "2.0.0-experimental.0f3404a"
49
+ "@solana/addresses": "2.0.0-experimental.109615d",
50
+ "@solana/codecs-core": "2.0.0-experimental.109615d",
51
+ "@solana/codecs-data-structures": "2.0.0-experimental.109615d",
52
+ "@solana/codecs-numbers": "2.0.0-experimental.109615d",
53
+ "@solana/codecs-strings": "2.0.0-experimental.109615d",
54
+ "@solana/functional": "2.0.0-experimental.109615d",
55
+ "@solana/keys": "2.0.0-experimental.109615d"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@solana/eslint-config-solana": "^1.0.2",
59
59
  "@swc/jest": "^0.2.29",
60
- "@types/jest": "^29.5.6",
60
+ "@types/jest": "^29.5.11",
61
61
  "@types/node": "18.11.19",
62
- "@typescript-eslint/eslint-plugin": "^6.7.0",
62
+ "@typescript-eslint/eslint-plugin": "^6.13.2",
63
63
  "@typescript-eslint/parser": "^6.3.0",
64
64
  "agadoo": "^3.0.0",
65
65
  "eslint": "^8.45.0",
@@ -71,7 +71,7 @@
71
71
  "tsup": "^8.0.1",
72
72
  "typescript": "^5.2.2",
73
73
  "version-from-git": "^1.1.1",
74
- "@solana/instructions": "2.0.0-experimental.0f3404a",
74
+ "@solana/instructions": "2.0.0-experimental.109615d",
75
75
  "build-scripts": "0.0.0",
76
76
  "test-config": "0.0.0",
77
77
  "test-matchers": "0.0.0",
@@ -86,8 +86,8 @@
86
86
  ]
87
87
  },
88
88
  "scripts": {
89
- "compile:js": "tsup --config build-scripts/tsup.config.library.ts",
90
- "compile:typedefs": "tsc -p ./tsconfig.declarations.json",
89
+ "compile:js": "tsup --config build-scripts/tsup.config.package.ts",
90
+ "compile:typedefs": "tsc -p ./tsconfig.declarations.json && node node_modules/build-scripts/add-js-extension-to-types.mjs",
91
91
  "dev": "jest -c node_modules/test-config/jest-dev.config.ts --rootDir . --watch",
92
92
  "publish-packages": "pnpm publish --tag experimental --access public --no-git-checks",
93
93
  "style:fix": "pnpm eslint --fix src/* && pnpm prettier -w src/* package.json",