@btc-vision/transaction 1.7.13 → 1.7.15

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 (42) hide show
  1. package/browser/_version.d.ts +1 -1
  2. package/browser/generators/Features.d.ts +6 -0
  3. package/browser/generators/builders/CalldataGenerator.d.ts +1 -1
  4. package/browser/generators/builders/LegacyCalldataGenerator.d.ts +1 -1
  5. package/browser/generators/builders/P2WDAGenerator.d.ts +1 -1
  6. package/browser/index.js +1 -1
  7. package/browser/keypair/Address.d.ts +1 -0
  8. package/browser/transaction/mineable/TimelockGenerator.d.ts +3 -0
  9. package/build/_version.d.ts +1 -1
  10. package/build/_version.js +1 -1
  11. package/build/epoch/ChallengeSolution.js +1 -1
  12. package/build/generators/Features.d.ts +6 -0
  13. package/build/generators/Features.js +6 -0
  14. package/build/generators/builders/CalldataGenerator.d.ts +1 -1
  15. package/build/generators/builders/CalldataGenerator.js +9 -6
  16. package/build/generators/builders/DeploymentGenerator.js +3 -2
  17. package/build/generators/builders/LegacyCalldataGenerator.d.ts +1 -1
  18. package/build/generators/builders/LegacyCalldataGenerator.js +9 -6
  19. package/build/generators/builders/P2WDAGenerator.d.ts +1 -1
  20. package/build/generators/builders/P2WDAGenerator.js +2 -1
  21. package/build/keypair/Address.d.ts +1 -0
  22. package/build/keypair/Address.js +10 -0
  23. package/build/transaction/builders/DeploymentTransaction.js +2 -1
  24. package/build/transaction/builders/InteractionTransaction.js +3 -1
  25. package/build/transaction/builders/InteractionTransactionP2WDA.js +3 -1
  26. package/build/transaction/builders/TransactionBuilder.js +12 -1
  27. package/build/transaction/mineable/TimelockGenerator.d.ts +3 -0
  28. package/build/transaction/mineable/TimelockGenerator.js +26 -7
  29. package/package.json +1 -1
  30. package/src/_version.ts +1 -1
  31. package/src/epoch/ChallengeSolution.ts +5 -1
  32. package/src/generators/Features.ts +7 -0
  33. package/src/generators/builders/CalldataGenerator.ts +11 -7
  34. package/src/generators/builders/DeploymentGenerator.ts +6 -2
  35. package/src/generators/builders/LegacyCalldataGenerator.ts +11 -7
  36. package/src/generators/builders/P2WDAGenerator.ts +4 -2
  37. package/src/keypair/Address.ts +35 -1
  38. package/src/transaction/builders/DeploymentTransaction.ts +2 -1
  39. package/src/transaction/builders/InteractionTransaction.ts +3 -1
  40. package/src/transaction/builders/InteractionTransactionP2WDA.ts +3 -1
  41. package/src/transaction/builders/TransactionBuilder.ts +14 -1
  42. package/src/transaction/mineable/TimelockGenerator.ts +47 -7
@@ -1 +1 @@
1
- export declare const version = "1.7.13";
1
+ export declare const version = "1.7.15";
@@ -6,9 +6,15 @@ export declare enum Features {
6
6
  EPOCH_SUBMISSION = 2,
7
7
  MLDSA_LINK_PUBKEY = 4
8
8
  }
9
+ export declare enum FeaturePriority {
10
+ ACCESS_LIST = 1,
11
+ EPOCH_SUBMISSION = 2,
12
+ MLDSA_LINK_PUBKEY = 3
13
+ }
9
14
  export interface Feature<T extends Features> {
10
15
  opcode: T;
11
16
  data: unknown;
17
+ priority: number;
12
18
  }
13
19
  export interface AccessListFeature extends Feature<Features.ACCESS_LIST> {
14
20
  data: LoadedStorage;
@@ -5,5 +5,5 @@ import { ChallengeSolution } from '../../epoch/ChallengeSolution.js';
5
5
  export declare class CalldataGenerator extends Generator {
6
6
  constructor(senderPubKey: Buffer, contractSaltPubKey: Buffer, network?: Network);
7
7
  static getPubKeyAsBuffer(witnessKeys: Buffer[], network: Network): Buffer;
8
- compile(calldata: Buffer, contractSecret: Buffer, challenge: ChallengeSolution, maxPriority: bigint, features?: Feature<Features>[]): Buffer;
8
+ compile(calldata: Buffer, contractSecret: Buffer, challenge: ChallengeSolution, maxPriority: bigint, featuresRaw?: Feature<Features>[]): Buffer;
9
9
  }
@@ -4,5 +4,5 @@ import { Feature, Features } from '../Features.js';
4
4
  export declare class LegacyCalldataGenerator extends Generator {
5
5
  constructor(senderPubKey: Buffer, network?: Network);
6
6
  static getPubKeyAsBuffer(witnessKeys: Buffer[], network: Network): Buffer;
7
- compile(calldata: Buffer, contractSecret: Buffer, challenge: Buffer, maxPriority: bigint, features?: Feature<Features>[]): Buffer;
7
+ compile(calldata: Buffer, contractSecret: Buffer, challenge: Buffer, maxPriority: bigint, featuresRaw?: Feature<Features>[]): Buffer;
8
8
  }
@@ -6,7 +6,7 @@ export declare class P2WDAGenerator extends Generator {
6
6
  private static readonly P2WDA_VERSION;
7
7
  constructor(senderPubKey: Buffer, contractSaltPubKey: Buffer, network?: Network);
8
8
  static validateWitnessSize(dataSize: number, maxWitnessFields?: number, maxBytesPerWitness?: number): boolean;
9
- compile(calldata: Buffer, contractSecret: Buffer, challenge: ChallengeSolution, maxPriority: bigint, features?: Feature<Features>[]): Buffer;
9
+ compile(calldata: Buffer, contractSecret: Buffer, challenge: ChallengeSolution, maxPriority: bigint, featuresRaw?: Feature<Features>[]): Buffer;
10
10
  getHeader(maxPriority: bigint, features?: Features[]): Buffer;
11
11
  private writeFeatures;
12
12
  private encodeFeatureData;