@solana/transactions 2.0.0-experimental.e1ca396 → 2.0.0-experimental.e374ac6

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 (50) hide show
  1. package/README.md +7 -3
  2. package/dist/index.browser.cjs +226 -165
  3. package/dist/index.browser.cjs.map +1 -1
  4. package/dist/index.browser.js +226 -169
  5. package/dist/index.browser.js.map +1 -1
  6. package/dist/index.native.js +226 -169
  7. package/dist/index.native.js.map +1 -1
  8. package/dist/index.node.cjs +226 -165
  9. package/dist/index.node.cjs.map +1 -1
  10. package/dist/index.node.js +228 -169
  11. package/dist/index.node.js.map +1 -1
  12. package/dist/types/accounts.d.ts.map +1 -1
  13. package/dist/types/blockhash.d.ts +4 -7
  14. package/dist/types/blockhash.d.ts.map +1 -1
  15. package/dist/types/compilable-transaction.d.ts +4 -4
  16. package/dist/types/compile-address-table-lookups.d.ts +1 -1
  17. package/dist/types/compile-header.d.ts +1 -1
  18. package/dist/types/compile-instructions.d.ts +1 -1
  19. package/dist/types/compile-lifetime-token.d.ts +1 -1
  20. package/dist/types/compile-static-accounts.d.ts +1 -1
  21. package/dist/types/compile-transaction.d.ts +3 -3
  22. package/dist/types/create-transaction.d.ts +1 -1
  23. package/dist/types/decompile-transaction.d.ts +12 -4
  24. package/dist/types/decompile-transaction.d.ts.map +1 -1
  25. package/dist/types/durable-nonce.d.ts +2 -2
  26. package/dist/types/durable-nonce.d.ts.map +1 -1
  27. package/dist/types/fee-payer.d.ts +2 -2
  28. package/dist/types/index.d.ts +13 -11
  29. package/dist/types/index.d.ts.map +1 -1
  30. package/dist/types/instructions.d.ts +4 -2
  31. package/dist/types/instructions.d.ts.map +1 -1
  32. package/dist/types/message.d.ts +6 -6
  33. package/dist/types/serializers/address-table-lookup.d.ts +1 -1
  34. package/dist/types/serializers/header.d.ts +1 -1
  35. package/dist/types/serializers/index.d.ts +2 -2
  36. package/dist/types/serializers/instruction.d.ts +1 -1
  37. package/dist/types/serializers/message.d.ts +1 -1
  38. package/dist/types/serializers/message.d.ts.map +1 -1
  39. package/dist/types/serializers/transaction-version.d.ts +1 -1
  40. package/dist/types/serializers/transaction-version.d.ts.map +1 -1
  41. package/dist/types/serializers/transaction.d.ts +7 -4
  42. package/dist/types/serializers/transaction.d.ts.map +1 -1
  43. package/dist/types/signatures.d.ts +2 -2
  44. package/dist/types/signatures.d.ts.map +1 -1
  45. package/dist/types/unsigned-transaction.d.ts +1 -1
  46. package/dist/types/wire-transaction.d.ts +1 -1
  47. package/package.json +18 -39
  48. package/dist/index.development.js +0 -1628
  49. package/dist/index.development.js.map +0 -1
  50. package/dist/index.production.min.js +0 -32
@@ -1 +1 @@
1
- {"version":3,"file":"decompile-transaction.d.ts","sourceRoot":"","sources":["../../src/decompile-transaction.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAM5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAyH1D,wBAAgB,oBAAoB,CAChC,mBAAmB,EAAE,mBAAmB,EACxC,oBAAoB,CAAC,EAAE,MAAM,GAC9B,qBAAqB,GAAG,CAAC,qBAAqB,GAAG,0BAA0B,CAAC,CAyC9E"}
1
+ {"version":3,"file":"decompile-transaction.d.ts","sourceRoot":"","sources":["../../src/decompile-transaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAmB,MAAM,mBAAmB,CAAC;AAc7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAM5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AA+C1D,MAAM,MAAM,6BAA6B,GAAG;IAAE,CAAC,kBAAkB,EAAE,OAAO,GAAG,OAAO,EAAE,CAAA;CAAE,CAAC;AAiIzF,MAAM,MAAM,0BAA0B,GAAG;IACrC,6BAA6B,CAAC,EAAE,6BAA6B,CAAC;IAC9D,oBAAoB,CAAC,EAAE,MAAM,CAAC;CACjC,CAAC;AAEF,wBAAgB,oBAAoB,CAChC,mBAAmB,EAAE,mBAAmB,EACxC,MAAM,CAAC,EAAE,0BAA0B,GACpC,qBAAqB,GAAG,CAAC,qBAAqB,GAAG,0BAA0B,CAAC,CA2C9E"}
@@ -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 +1 @@
1
- {"version":3,"file":"durable-nonce.d.ts","sourceRoot":"","sources":["../../src/durable-nonce.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAEH,YAAY,EACZ,wBAAwB,EACxB,oBAAoB,EAEpB,eAAe,EACf,qBAAqB,EACrB,eAAe,EACf,qBAAqB,EACxB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAG1C,KAAK,8BAA8B,CAC/B,oBAAoB,SAAS,MAAM,GAAG,MAAM,EAC5C,sBAAsB,SAAS,MAAM,GAAG,MAAM,IAC9C,YAAY,CAAC,kCAAkC,CAAC,GAChD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Y,EAAE;KACpB,CAAC;IACF,QAAQ,CAAC,kBAAkB,EAAE,uBAAuB,CAAC,WAAW,CAAC,CAAC;CACrE;AAED,wBAAgB,+BAA+B,CAC3C,WAAW,EAAE,eAAe,GAAG,CAAC,eAAe,GAAG,wBAAwB,CAAC,GAC5E,OAAO,CAAC,WAAW,IAAI,eAAe,GAAG,wBAAwB,CAInE;AAuBD,wBAAgB,gCAAgC,CAC5C,WAAW,EAAE,YAAY,GAC1B,WAAW,IAAI,8BAA8B,CAkB/C;AAgCD,wBAAgB,uCAAuC,CACnD,YAAY,SAAS,eAAe,EACpC,oBAAoB,SAAS,MAAM,GAAG,MAAM,EAC5C,sBAAsB,SAAS,MAAM,GAAG,MAAM,EAC9C,WAAW,SAAS,MAAM,GAAG,MAAM,EAEnC,EACI,KAAK,EACL,mBAAmB,EACnB,qBAAqB,GACxB,EAAE,kBAAkB,CAAC,oBAAoB,EAAE,sBAAsB,EAAE,WAAW,CAAC,EAChF,WAAW,EAAE,YAAY,GAAG,CAAC,YAAY,GAAG,wBAAwB,CAAC,GACtE,IAAI,CAAC,YAAY,EAAE,MAAM,0BAA0B,CAAC,GACnD,wBAAwB,CAAC,oBAAoB,EAAE,sBAAsB,EAAE,WAAW,CAAC,CAwCtF"}
@@ -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,14 @@
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 './decompile-transaction.js';
5
+ export * from './durable-nonce.js';
6
+ export * from './fee-payer.js';
7
+ export * from './instructions.js';
8
+ export * from './message.js';
9
+ export * from './serializers/index.js';
10
+ export * from './signatures.js';
11
+ export * from './types.js';
12
+ export * from './unsigned-transaction.js';
13
+ export * from './wire-transaction.js';
12
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC"}
@@ -1,5 +1,7 @@
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
+ export declare function appendTransactionInstructions<TTransaction extends BaseTransaction>(instructions: ReadonlyArray<TTransaction['instructions'][number]>, transaction: TTransaction | (TTransaction & ITransactionWithSignatures)): TTransaction | Omit<TTransaction, keyof ITransactionWithSignatures>;
4
5
  export declare function prependTransactionInstruction<TTransaction extends BaseTransaction>(instruction: TTransaction['instructions'][number], transaction: TTransaction | (TTransaction & ITransactionWithSignatures)): TTransaction | Omit<TTransaction, keyof ITransactionWithSignatures>;
6
+ export declare function prependTransactionInstructions<TTransaction extends BaseTransaction>(instructions: ReadonlyArray<TTransaction['instructions'][number]>, transaction: TTransaction | (TTransaction & ITransactionWithSignatures)): TTransaction | Omit<TTransaction, keyof ITransactionWithSignatures>;
5
7
  //# sourceMappingURL=instructions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["../../src/instructions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAG1C,wBAAgB,4BAA4B,CAAC,YAAY,SAAS,eAAe,EAC7E,WAAW,EAAE,YAAY,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,EACjD,WAAW,EAAE,YAAY,GAAG,CAAC,YAAY,GAAG,0BAA0B,CAAC,GACxE,YAAY,GAAG,IAAI,CAAC,YAAY,EAAE,MAAM,0BAA0B,CAAC,CAOrE;AAED,wBAAgB,6BAA6B,CAAC,YAAY,SAAS,eAAe,EAC9E,WAAW,EAAE,YAAY,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,EACjD,WAAW,EAAE,YAAY,GAAG,CAAC,YAAY,GAAG,0BAA0B,CAAC,GACxE,YAAY,GAAG,IAAI,CAAC,YAAY,EAAE,MAAM,0BAA0B,CAAC,CAOrE"}
1
+ {"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["../../src/instructions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAG1C,wBAAgB,4BAA4B,CAAC,YAAY,SAAS,eAAe,EAC7E,WAAW,EAAE,YAAY,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,EACjD,WAAW,EAAE,YAAY,GAAG,CAAC,YAAY,GAAG,0BAA0B,CAAC,GACxE,YAAY,GAAG,IAAI,CAAC,YAAY,EAAE,MAAM,0BAA0B,CAAC,CAErE;AAED,wBAAgB,6BAA6B,CAAC,YAAY,SAAS,eAAe,EAC9E,YAAY,EAAE,aAAa,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC,EACjE,WAAW,EAAE,YAAY,GAAG,CAAC,YAAY,GAAG,0BAA0B,CAAC,GACxE,YAAY,GAAG,IAAI,CAAC,YAAY,EAAE,MAAM,0BAA0B,CAAC,CAOrE;AAED,wBAAgB,6BAA6B,CAAC,YAAY,SAAS,eAAe,EAC9E,WAAW,EAAE,YAAY,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,EACjD,WAAW,EAAE,YAAY,GAAG,CAAC,YAAY,GAAG,0BAA0B,CAAC,GACxE,YAAY,GAAG,IAAI,CAAC,YAAY,EAAE,MAAM,0BAA0B,CAAC,CAErE;AAED,wBAAgB,8BAA8B,CAAC,YAAY,SAAS,eAAe,EAC/E,YAAY,EAAE,aAAa,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC,EACjE,WAAW,EAAE,YAAY,GAAG,CAAC,YAAY,GAAG,0BAA0B,CAAC,GACxE,YAAY,GAAG,IAAI,CAAC,YAAY,EAAE,MAAM,0BAA0B,CAAC,CAOrE"}
@@ -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 +1 @@
1
- {"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../src/serializers/message.ts"],"names":[],"mappings":"AACA,OAAO,EAMH,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACtB,MAAM,qBAAqB,CAAC;AAa7B,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AA2D7C,wBAAgB,yBAAyB,IAAI,mBAAmB,CAAC,eAAe,CAAC,CAiBhF;AAED,wBAAgB,yBAAyB,IAAI,mBAAmB,CAAC,eAAe,CAAC,CAOhF;AAED,wBAAgB,uBAAuB,IAAI,iBAAiB,CAAC,eAAe,CAAC,CAE5E"}
1
+ {"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../src/serializers/message.ts"],"names":[],"mappings":"AACA,OAAO,EAMH,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACtB,MAAM,qBAAqB,CAAC;AAM7B,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAyD7C,wBAAgB,yBAAyB,IAAI,mBAAmB,CAAC,eAAe,CAAC,CAiBhF;AAED,wBAAgB,yBAAyB,IAAI,mBAAmB,CAAC,eAAe,CAAC,CAehF;AAED,wBAAgB,uBAAuB,IAAI,iBAAiB,CAAC,eAAe,CAAC,CAE5E"}
@@ -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 +1 @@
1
- {"version":3,"file":"transaction-version.d.ts","sourceRoot":"","sources":["../../../src/serializers/transaction-version.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACtB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAI9C,wBAAgB,4BAA4B,IAAI,mBAAmB,CAAC,kBAAkB,CAAC,CAgBtF;AAED,wBAAgB,4BAA4B,IAAI,mBAAmB,CAAC,kBAAkB,CAAC,CActF;AAED,wBAAgB,0BAA0B,IAAI,iBAAiB,CAAC,kBAAkB,CAAC,CAElF"}
1
+ {"version":3,"file":"transaction-version.d.ts","sourceRoot":"","sources":["../../../src/serializers/transaction-version.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACtB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAI9C,wBAAgB,4BAA4B,IAAI,mBAAmB,CAAC,kBAAkB,CAAC,CAiBtF;AAED,wBAAgB,4BAA4B,IAAI,mBAAmB,CAAC,kBAAkB,CAAC,CActF;AAED,wBAAgB,0BAA0B,IAAI,iBAAiB,CAAC,kBAAkB,CAAC,CAElF"}
@@ -1,7 +1,10 @@
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 { CompiledTransaction } from '../compile-transaction.js';
4
+ import { DecompileTransactionConfig } from '../decompile-transaction.js';
5
+ import { ITransactionWithSignatures } from '../signatures.js';
6
+ export declare function getCompiledTransactionDecoder(): VariableSizeDecoder<CompiledTransaction>;
4
7
  export declare function getTransactionEncoder(): VariableSizeEncoder<CompilableTransaction | (CompilableTransaction & ITransactionWithSignatures)>;
5
- export declare function getTransactionDecoder(lastValidBlockHeight?: bigint): VariableSizeDecoder<CompilableTransaction | (CompilableTransaction & ITransactionWithSignatures)>;
6
- export declare function getTransactionCodec(lastValidBlockHeight?: bigint): VariableSizeCodec<CompilableTransaction | (CompilableTransaction & ITransactionWithSignatures)>;
8
+ export declare function getTransactionDecoder(config?: DecompileTransactionConfig): VariableSizeDecoder<CompilableTransaction | (CompilableTransaction & ITransactionWithSignatures)>;
9
+ export declare function getTransactionCodec(config?: DecompileTransactionConfig): VariableSizeCodec<CompilableTransaction | (CompilableTransaction & ITransactionWithSignatures)>;
7
10
  //# sourceMappingURL=transaction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../../../src/serializers/transaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAKH,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACtB,MAAM,qBAAqB,CAAC;AAY7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAGlE,OAAO,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAsB3D,wBAAgB,qBAAqB,IAAI,mBAAmB,CACxD,qBAAqB,GAAG,CAAC,qBAAqB,GAAG,0BAA0B,CAAC,CAC/E,CAEA;AAED,wBAAgB,qBAAqB,CACjC,oBAAoB,CAAC,EAAE,MAAM,GAC9B,mBAAmB,CAAC,qBAAqB,GAAG,CAAC,qBAAqB,GAAG,0BAA0B,CAAC,CAAC,CAInG;AAED,wBAAgB,mBAAmB,CAC/B,oBAAoB,CAAC,EAAE,MAAM,GAC9B,iBAAiB,CAAC,qBAAqB,GAAG,CAAC,qBAAqB,GAAG,0BAA0B,CAAC,CAAC,CAEjG"}
1
+ {"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../../../src/serializers/transaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAKH,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACtB,MAAM,qBAAqB,CAAC;AAY7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAA0B,MAAM,wBAAwB,CAAC;AACrF,OAAO,EAAwB,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AAC5F,OAAO,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAU3D,wBAAgB,6BAA6B,IAAI,mBAAmB,CAAC,mBAAmB,CAAC,CAUxF;AAED,wBAAgB,qBAAqB,IAAI,mBAAmB,CACxD,qBAAqB,GAAG,CAAC,qBAAqB,GAAG,0BAA0B,CAAC,CAC/E,CAEA;AAED,wBAAgB,qBAAqB,CACjC,MAAM,CAAC,EAAE,0BAA0B,GACpC,mBAAmB,CAAC,qBAAqB,GAAG,CAAC,qBAAqB,GAAG,0BAA0B,CAAC,CAAC,CAInG;AAED,wBAAgB,mBAAmB,CAC/B,MAAM,CAAC,EAAE,0BAA0B,GACpC,iBAAiB,CAAC,qBAAqB,GAAG,CAAC,qBAAqB,GAAG,0BAA0B,CAAC,CAAC,CAEjG"}
@@ -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 +1 @@
1
- {"version":3,"file":"signatures.d.ts","sourceRoot":"","sources":["../../src/signatures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAA2B,MAAM,mBAAmB,CAAC;AAIrE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAa,MAAM,cAAc,CAAC;AAEpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAIvD,MAAM,WAAW,uBAAwB,SAAQ,0BAA0B;IACvE,QAAQ,CAAC,OAAO,EAAE,OAAO,MAAM,CAAC;CACnC;AACD,MAAM,WAAW,0BAA0B;IACvC,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC;CAClE;AAID,wBAAgB,2BAA2B,CACvC,WAAW,EAAE,wBAAwB,GAAG,0BAA0B,GACnE,SAAS,CAaX;AAED,wBAAsB,wBAAwB,CAAC,YAAY,SAAS,qBAAqB,EACrF,QAAQ,EAAE,aAAa,EAAE,EACzB,WAAW,EAAE,YAAY,GAAG,CAAC,YAAY,GAAG,0BAA0B,CAAC,GACxE,OAAO,CAAC,YAAY,GAAG,0BAA0B,CAAC,CAmBpD;AAED,wBAAsB,eAAe,CAAC,YAAY,SAAS,qBAAqB,EAC5E,QAAQ,EAAE,aAAa,EAAE,EACzB,WAAW,EAAE,YAAY,GAAG,CAAC,YAAY,GAAG,0BAA0B,CAAC,GACxE,OAAO,CAAC,YAAY,GAAG,uBAAuB,CAAC,CAKjD;AAED,wBAAgB,8BAA8B,CAAC,YAAY,SAAS,qBAAqB,EACrF,WAAW,EAAE,YAAY,GAAG,0BAA0B,GACvD,OAAO,CAAC,WAAW,IAAI,YAAY,GAAG,uBAAuB,CAY/D"}
1
+ {"version":3,"file":"signatures.d.ts","sourceRoot":"","sources":["../../src/signatures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAA2B,MAAM,mBAAmB,CAAC;AASrE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAa,MAAM,cAAc,CAAC;AAEpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAIvD,MAAM,WAAW,uBAAwB,SAAQ,0BAA0B;IACvE,QAAQ,CAAC,OAAO,EAAE,OAAO,MAAM,CAAC;CACnC;AACD,MAAM,WAAW,0BAA0B;IACvC,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC;CAClE;AAID,wBAAgB,2BAA2B,CACvC,WAAW,EAAE,wBAAwB,GAAG,0BAA0B,GACnE,SAAS,CASX;AAED,wBAAsB,wBAAwB,CAAC,YAAY,SAAS,qBAAqB,EACrF,QAAQ,EAAE,aAAa,EAAE,EACzB,WAAW,EAAE,YAAY,GAAG,CAAC,YAAY,GAAG,0BAA0B,CAAC,GACxE,OAAO,CAAC,YAAY,GAAG,0BAA0B,CAAC,CAmBpD;AAED,wBAAsB,eAAe,CAAC,YAAY,SAAS,qBAAqB,EAC5E,QAAQ,EAAE,aAAa,EAAE,EACzB,WAAW,EAAE,YAAY,GAAG,CAAC,YAAY,GAAG,0BAA0B,CAAC,GACxE,OAAO,CAAC,YAAY,GAAG,uBAAuB,CAAC,CAKjD;AAED,wBAAgB,8BAA8B,CAAC,YAAY,SAAS,qBAAqB,EACrF,WAAW,EAAE,YAAY,GAAG,0BAA0B,GACvD,OAAO,CAAC,WAAW,IAAI,YAAY,GAAG,uBAAuB,CAkB/D"}
@@ -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.e1ca396",
3
+ "version": "2.0.0-experimental.e374ac6",
4
4
  "description": "Helpers for creating and serializing transactions",
5
5
  "exports": {
6
6
  "browser": {
@@ -46,36 +46,14 @@
46
46
  "maintained node versions"
47
47
  ],
48
48
  "dependencies": {
49
- "@solana/codecs-core": "2.0.0-experimental.e1ca396",
50
- "@solana/codecs-data-structures": "2.0.0-experimental.e1ca396",
51
- "@solana/addresses": "2.0.0-experimental.e1ca396",
52
- "@solana/codecs-numbers": "2.0.0-experimental.e1ca396",
53
- "@solana/functional": "2.0.0-experimental.e1ca396",
54
- "@solana/codecs-strings": "2.0.0-experimental.e1ca396",
55
- "@solana/keys": "2.0.0-experimental.e1ca396"
56
- },
57
- "devDependencies": {
58
- "@solana/eslint-config-solana": "^1.0.2",
59
- "@swc/jest": "^0.2.29",
60
- "@types/jest": "^29.5.6",
61
- "@types/node": "18.11.19",
62
- "@typescript-eslint/eslint-plugin": "^6.7.0",
63
- "@typescript-eslint/parser": "^6.3.0",
64
- "agadoo": "^3.0.0",
65
- "eslint": "^8.45.0",
66
- "eslint-plugin-sort-keys-fix": "^1.1.2",
67
- "jest": "^29.7.0",
68
- "jest-runner-eslint": "^2.1.2",
69
- "jest-runner-prettier": "^1.0.0",
70
- "prettier": "^3.1",
71
- "tsup": "^8.0.1",
72
- "typescript": "^5.2.2",
73
- "version-from-git": "^1.1.1",
74
- "@solana/instructions": "2.0.0-experimental.e1ca396",
75
- "test-matchers": "0.0.0",
76
- "build-scripts": "0.0.0",
77
- "test-config": "0.0.0",
78
- "tsconfig": "0.0.0"
49
+ "@solana/addresses": "2.0.0-experimental.e374ac6",
50
+ "@solana/codecs-core": "2.0.0-experimental.e374ac6",
51
+ "@solana/codecs-numbers": "2.0.0-experimental.e374ac6",
52
+ "@solana/codecs-strings": "2.0.0-experimental.e374ac6",
53
+ "@solana/codecs-data-structures": "2.0.0-experimental.e374ac6",
54
+ "@solana/errors": "2.0.0-experimental.e374ac6",
55
+ "@solana/functional": "2.0.0-experimental.e374ac6",
56
+ "@solana/keys": "2.0.0-experimental.e374ac6"
79
57
  },
80
58
  "bundlewatch": {
81
59
  "defaultCompression": "gzip",
@@ -86,18 +64,19 @@
86
64
  ]
87
65
  },
88
66
  "scripts": {
89
- "compile:js": "tsup --config build-scripts/tsup.config.library.ts",
90
- "compile:typedefs": "tsc -p ./tsconfig.declarations.json",
91
- "dev": "jest -c node_modules/test-config/jest-dev.config.ts --rootDir . --watch",
92
- "publish-packages": "pnpm publish --tag experimental --access public --no-git-checks",
67
+ "compile:js": "tsup --config build-scripts/tsup.config.package.ts",
68
+ "compile:typedefs": "tsc -p ./tsconfig.declarations.json && node node_modules/@solana/build-scripts/add-js-extension-to-types.mjs",
69
+ "dev": "jest -c node_modules/@solana/test-config/jest-dev.config.ts --rootDir . --watch",
70
+ "publish-impl": "npm view $npm_package_name@$npm_package_version > /dev/null 2>&1 || pnpm publish --tag experimental --access public --no-git-checks",
71
+ "publish-packages": "pnpm prepublishOnly && pnpm publish-impl",
93
72
  "style:fix": "pnpm eslint --fix src/* && pnpm prettier -w src/* package.json",
94
- "test:lint": "jest -c node_modules/test-config/jest-lint.config.ts --rootDir . --silent",
95
- "test:prettier": "jest -c node_modules/test-config/jest-prettier.config.ts --rootDir . --silent",
73
+ "test:lint": "jest -c node_modules/@solana/test-config/jest-lint.config.ts --rootDir . --silent",
74
+ "test:prettier": "jest -c node_modules/@solana/test-config/jest-prettier.config.ts --rootDir . --silent",
96
75
  "test:treeshakability:browser": "agadoo dist/index.browser.js",
97
76
  "test:treeshakability:native": "agadoo dist/index.native.js",
98
77
  "test:treeshakability:node": "agadoo dist/index.node.js",
99
78
  "test:typecheck": "tsc --noEmit",
100
- "test:unit:browser": "jest -c node_modules/test-config/jest-unit.config.browser.ts --rootDir . --silent",
101
- "test:unit:node": "jest -c node_modules/test-config/jest-unit.config.node.ts --rootDir . --silent"
79
+ "test:unit:browser": "jest -c node_modules/@solana/test-config/jest-unit.config.browser.ts --rootDir . --silent",
80
+ "test:unit:node": "jest -c node_modules/@solana/test-config/jest-unit.config.node.ts --rootDir . --silent"
102
81
  }
103
82
  }