@btc-vision/transaction 1.2.6 → 1.2.8
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.
- package/README.md +4 -19
- package/browser/_version.d.ts +1 -1
- package/browser/generators/Generator.d.ts +1 -0
- package/browser/generators/builders/CalldataGenerator.d.ts +1 -1
- package/browser/generators/builders/DeploymentGenerator.d.ts +1 -1
- package/browser/generators/builders/LegacyCalldataGenerator.d.ts +1 -1
- package/browser/index.js +1 -1
- package/browser/transaction/builders/MultiSignTransaction.d.ts +1 -1
- package/browser/transaction/builders/TransactionBuilder.d.ts +1 -0
- package/browser/transaction/interfaces/ITransactionParameters.d.ts +1 -0
- package/browser/verification/TapscriptVerificator.d.ts +1 -0
- package/build/_version.d.ts +1 -1
- package/build/_version.js +1 -1
- package/build/generators/Generator.d.ts +1 -0
- package/build/generators/Generator.js +7 -0
- package/build/generators/builders/CalldataGenerator.d.ts +1 -1
- package/build/generators/builders/CalldataGenerator.js +2 -2
- package/build/generators/builders/DeploymentGenerator.d.ts +1 -1
- package/build/generators/builders/DeploymentGenerator.js +4 -4
- package/build/generators/builders/LegacyCalldataGenerator.d.ts +1 -1
- package/build/generators/builders/LegacyCalldataGenerator.js +5 -23
- package/build/transaction/TransactionFactory.js +3 -2
- package/build/transaction/builders/DeploymentTransaction.js +1 -1
- package/build/transaction/builders/InteractionTransaction.js +1 -1
- package/build/transaction/builders/MultiSignTransaction.d.ts +1 -1
- package/build/transaction/builders/MultiSignTransaction.js +1 -0
- package/build/transaction/builders/SharedInteractionTransaction.js +3 -0
- package/build/transaction/builders/TransactionBuilder.d.ts +1 -0
- package/build/transaction/builders/TransactionBuilder.js +5 -2
- package/build/transaction/interfaces/ITransactionParameters.d.ts +1 -0
- package/build/utxo/OPNetLimitedProvider.js +2 -1
- package/build/verification/TapscriptVerificator.d.ts +1 -0
- package/build/verification/TapscriptVerificator.js +2 -2
- package/package.json +3 -3
- package/src/_version.ts +1 -1
- package/src/generators/Generator.ts +9 -0
- package/src/generators/builders/CalldataGenerator.ts +4 -1
- package/src/generators/builders/DeploymentGenerator.ts +6 -3
- package/src/generators/builders/LegacyCalldataGenerator.ts +11 -40
- package/src/transaction/TransactionFactory.ts +3 -2
- package/src/transaction/browser/extensions/UnisatSigner.ts +1 -1
- package/src/transaction/builders/DeploymentTransaction.ts +1 -0
- package/src/transaction/builders/InteractionTransaction.ts +1 -0
- package/src/transaction/builders/MultiSignTransaction.ts +2 -1
- package/src/transaction/builders/SharedInteractionTransaction.ts +4 -0
- package/src/transaction/builders/TransactionBuilder.ts +6 -2
- package/src/transaction/interfaces/ITransactionParameters.ts +1 -0
- package/src/utxo/OPNetLimitedProvider.ts +2 -1
- package/src/verification/TapscriptVerificator.ts +3 -0
package/README.md
CHANGED
|
@@ -15,6 +15,9 @@ The OP_NET Transaction Builder library allows you to create and sign transaction
|
|
|
15
15
|
TypeScript, this library provides a comprehensive set of functions to facilitate the creation, reading, and manipulation
|
|
16
16
|
of OP_NET transactions, smart contracts, and other OP_NET-related technologies.
|
|
17
17
|
|
|
18
|
+
You can create any sort of transaction, and you don't have to bother about managing signer types or anything
|
|
19
|
+
complicated.
|
|
20
|
+
|
|
18
21
|
## Getting Started
|
|
19
22
|
|
|
20
23
|
### Prerequisites
|
|
@@ -30,8 +33,7 @@ npm i @btc-vision/transaction
|
|
|
30
33
|
|
|
31
34
|
### Documentation
|
|
32
35
|
|
|
33
|
-
Documentation is available at [
|
|
34
|
-
of the repository.
|
|
36
|
+
Documentation is available at [docs.opnet.org](https://docs.opnet.org)
|
|
35
37
|
|
|
36
38
|
#### Development
|
|
37
39
|
|
|
@@ -48,23 +50,6 @@ of the repository.
|
|
|
48
50
|
npm i
|
|
49
51
|
```
|
|
50
52
|
|
|
51
|
-
## Deployments, Wrapping and Unwrapping
|
|
52
|
-
|
|
53
|
-
WARNING: POSSIBLY OUTDATED
|
|
54
|
-
|
|
55
|
-
To learn how to wrap and unwrap Bitcoin on OP_NET, please refer to
|
|
56
|
-
the [Wrap.md](https://github.com/btc-vision/transaction/blob/main/Wrap.md) guide.
|
|
57
|
-
|
|
58
|
-
To learn how to unwrap Bitcoin on OP_NET, please refer to
|
|
59
|
-
the [Unwrap.md](https://github.com/btc-vision/transaction/blob/main/Unwrap.md) guide.
|
|
60
|
-
|
|
61
|
-
To learn how to deploy smart contracts on OP_NET, please refer to
|
|
62
|
-
the [Deploy.md](https://github.com/btc-vision/transaction/blob/main/Deploy.md) guide.
|
|
63
|
-
|
|
64
|
-
## Usage
|
|
65
|
-
|
|
66
|
-
OUTDATED EXAMPLE. New examples will be added soon.
|
|
67
|
-
|
|
68
53
|
## Contribution
|
|
69
54
|
|
|
70
55
|
Contributions are welcome! Please read through the `CONTRIBUTING.md` file for guidelines on how to submit issues,
|
package/browser/_version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "1.2.
|
|
1
|
+
export declare const version = "1.2.7";
|
|
@@ -8,6 +8,7 @@ export declare abstract class Generator {
|
|
|
8
8
|
protected readonly network: Network;
|
|
9
9
|
protected constructor(senderPubKey: Buffer, contractSaltPubKey?: Buffer, network?: Network);
|
|
10
10
|
get senderFirstByte(): Buffer;
|
|
11
|
+
getHeader(maxPriority: bigint): Buffer;
|
|
11
12
|
abstract compile(...args: unknown[]): Buffer;
|
|
12
13
|
protected splitBufferIntoChunks(buffer: Buffer, chunkSize?: number): Array<Buffer[]>;
|
|
13
14
|
}
|
|
@@ -4,5 +4,5 @@ import { Generator } from '../Generator.js';
|
|
|
4
4
|
export declare class CalldataGenerator extends Generator {
|
|
5
5
|
constructor(senderPubKey: Buffer, contractSaltPubKey: Buffer, network?: Network);
|
|
6
6
|
static getPubKeyAsBuffer(witnessKeys: Buffer[], network: Network): Buffer;
|
|
7
|
-
compile(calldata: Buffer, contractSecret: Buffer, preimage: Buffer, features?: Features[]): Buffer;
|
|
7
|
+
compile(calldata: Buffer, contractSecret: Buffer, preimage: Buffer, maxPriority: bigint, features?: Features[]): Buffer;
|
|
8
8
|
}
|
|
@@ -2,6 +2,6 @@ import { Network } from '@btc-vision/bitcoin';
|
|
|
2
2
|
import { Generator } from '../Generator.js';
|
|
3
3
|
export declare class DeploymentGenerator extends Generator {
|
|
4
4
|
constructor(senderPubKey: Buffer, contractSaltPubKey: Buffer, network?: Network);
|
|
5
|
-
compile(contractBytecode: Buffer, contractSalt: Buffer, preimage: Buffer, calldata?: Buffer): Buffer;
|
|
5
|
+
compile(contractBytecode: Buffer, contractSalt: Buffer, preimage: Buffer, maxPriority: bigint, calldata?: Buffer): Buffer;
|
|
6
6
|
private getAsm;
|
|
7
7
|
}
|
|
@@ -4,5 +4,5 @@ import { Generator } from '../Generator.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,
|
|
7
|
+
compile(calldata: Buffer, contractSecret: Buffer, preimage: Buffer, maxPriority: bigint, features?: Features[]): Buffer;
|
|
8
8
|
}
|