@btc-vision/transaction 1.0.0 → 1.0.2
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/LICENSE.md +58 -12
- package/README.md +8 -7
- package/browser/_version.d.ts +1 -1
- package/browser/index.js +2 -2
- package/browser/tests/Regtest.d.ts +3 -0
- package/browser/tests/test.d.ts +1 -0
- package/browser/transaction/builders/TransactionBuilder.d.ts +2 -1
- package/build/_version.d.ts +1 -1
- package/build/_version.js +1 -1
- package/build/tests/Regtest.d.ts +3 -0
- package/build/tests/Regtest.js +29 -0
- package/build/tests/test.d.ts +1 -0
- package/build/tests/test.js +74 -0
- package/build/transaction/builders/TransactionBuilder.d.ts +2 -1
- package/build/transaction/builders/TransactionBuilder.js +5 -3
- package/docs/classes/BitcoinUtils.html +182 -182
- package/docs/classes/CalldataGenerator.html +210 -210
- package/docs/classes/Compressor.html +184 -184
- package/docs/classes/ContractBaseMetadata.html +181 -181
- package/docs/classes/DeploymentGenerator.html +199 -199
- package/docs/classes/EcKeyPair.html +279 -279
- package/docs/classes/FundingTransaction.html +315 -292
- package/docs/classes/Generator.html +198 -198
- package/docs/classes/InteractionTransaction.html +387 -364
- package/docs/classes/TransactionBuilder.html +325 -302
- package/docs/classes/TransactionFactory.html +179 -179
- package/docs/classes/TweakedSigner.html +180 -180
- package/docs/classes/UTXOManager.html +186 -186
- package/docs/classes/Wallet.html +190 -190
- package/docs/classes/wBTC.html +188 -188
- package/docs/enums/TransactionType.html +178 -178
- package/docs/index.html +9 -9
- package/docs/interfaces/FetchUTXOParams.html +177 -177
- package/docs/interfaces/IFundingTransactionParameters.html +181 -181
- package/docs/interfaces/IInteractionParameters.html +184 -184
- package/docs/interfaces/ITransactionDataContractDeployment.html +183 -183
- package/docs/interfaces/ITransactionDataContractInteractionWrap.html +185 -185
- package/docs/interfaces/ITransactionParameters.html +180 -180
- package/docs/interfaces/IWallet.html +180 -180
- package/docs/interfaces/NetworkInformation.html +175 -175
- package/docs/interfaces/PsbtInputExtended.html +193 -193
- package/docs/interfaces/PsbtOutputExtendedAddress.html +182 -182
- package/docs/interfaces/PsbtOutputExtendedScript.html +182 -182
- package/docs/interfaces/RawUTXOResponse.html +177 -177
- package/docs/interfaces/TapLeafScript.html +176 -176
- package/docs/interfaces/TweakSettings.html +178 -178
- package/docs/interfaces/UTXO.html +177 -177
- package/docs/interfaces/UpdateInput.html +174 -174
- package/docs/types/PsbtOutputExtended.html +173 -173
- package/docs/variables/version.html +173 -173
- package/package.json +4 -4
- package/src/_version.ts +1 -1
- package/src/scripts/Regtest.ts +19 -19
- package/src/scripts/test.ts +98 -98
- package/src/tests/Regtest.ts +36 -0
- package/src/tests/test.ts +102 -0
- package/src/transaction/builders/TransactionBuilder.ts +606 -603
- package/tests/TransactionBuilder.test.ts +58 -58
- package/tsconfig.webpack.json +8 -0
package/LICENSE.md
CHANGED
|
@@ -1,16 +1,62 @@
|
|
|
1
|
-
|
|
1
|
+
# Custom Software License Agreement
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## 1. Definitions
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
- **"Licensor"** refers to the owner(s) and creator(s) of the software. The owner of the github organization "
|
|
6
|
+
btc-vision", "BlobMaster41".
|
|
7
|
+
- **"User"** refers to any person or entity that accesses or uses the software.
|
|
8
|
+
- **"Software"** refers to the source code, binaries, and documentation, whether in electronic or printed format, made
|
|
9
|
+
available by Licensor.
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
Software.
|
|
11
|
+
## 2. Grant of License
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
This License permits User to view the Software via the repository hosting the Software ("Hosting Service"). Except as
|
|
14
|
+
provided in this Section, no other use of the Software is permitted. The User may not modify, copy, reproduce,
|
|
15
|
+
republish, upload, post, transmit, or distribute the Software in any way.
|
|
16
|
+
|
|
17
|
+
## 3. Restrictions
|
|
18
|
+
|
|
19
|
+
- **Modification and Distribution**: User is prohibited from modifying, merging, distributing, sublicensing, and/or
|
|
20
|
+
selling copies of the Software.
|
|
21
|
+
- **Commercial Use**: User is prohibited from using the Software for any commercial purposes.
|
|
22
|
+
- **Reverse Engineering**: User is prohibited from reverse engineering, decompiling, or disassembling the Software.
|
|
23
|
+
|
|
24
|
+
## 4. Termination
|
|
25
|
+
|
|
26
|
+
This License is effective until terminated by the Licensor. It will terminate immediately without notice from the
|
|
27
|
+
Licensor if User fails to comply with any provision of this License. Upon termination, User must destroy all copies of
|
|
28
|
+
the Software.
|
|
29
|
+
|
|
30
|
+
## 5. Release to Public
|
|
31
|
+
|
|
32
|
+
This License restricts the above rights until the Software is officially released to the public by the Licensor. Upon
|
|
33
|
+
such release, the terms of this License may be modified by the Licensor to allow broader use rights.
|
|
34
|
+
|
|
35
|
+
## 6. Governing Law
|
|
36
|
+
|
|
37
|
+
This License shall be governed by and construed in accordance with the laws of [Toronto, Canada]. Any legal action or
|
|
38
|
+
proceeding arising under this License will be brought exclusively in the courts located in [Toronto], and the parties
|
|
39
|
+
hereby consent to personal jurisdiction and venue therein.
|
|
40
|
+
|
|
41
|
+
## 7. Limitation of Liability
|
|
42
|
+
|
|
43
|
+
In no event will the Licensor be liable for any damages, including, without limitation, indirect, incidental, special,
|
|
44
|
+
consequential, or punitive damages arising out of the use of or inability to use the Software.
|
|
45
|
+
|
|
46
|
+
## 8. Indemnification
|
|
47
|
+
|
|
48
|
+
User agrees to indemnify, defend, and hold harmless the Licensor and its affiliates, officers, agents, employees, and
|
|
49
|
+
partners from any claim or demand, including reasonable attorneys' fees, made by any third party due to or arising out
|
|
50
|
+
of User's use of the Software, User's violation of this License, or User's violation of any rights of another.
|
|
51
|
+
|
|
52
|
+
## 9. Breach of License
|
|
53
|
+
|
|
54
|
+
Any breach of this License will result in immediate termination of User's rights under this License. Additionally, the
|
|
55
|
+
Licensor reserves the right to pursue any legal action against the User in the event of a breach of this License.
|
|
56
|
+
|
|
57
|
+
## 10. Acknowledgment
|
|
58
|
+
|
|
59
|
+
User acknowledges that they have read this License, understand it, and agree to be bound by its terms and conditions.
|
|
60
|
+
User also agrees that this License is the complete and exclusive statement of the agreement between the Licensor and the
|
|
61
|
+
User and supersedes all proposals or prior agreements, oral or written, and any other communications between the
|
|
62
|
+
Licensor and the User relating to the subject matter of this License.
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# OP_NET - Transaction Builder
|
|
2
2
|
|
|
3
3
|

|
|
4
4
|

|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
|
|
12
12
|
## Introduction
|
|
13
13
|
|
|
14
|
-
The
|
|
14
|
+
The OP_NET Transaction Builder library allows you to create and sign transactions for the OP_NET network. Written in
|
|
15
15
|
TypeScript, this library provides a comprehensive set of functions to facilitate the creation, reading, and manipulation
|
|
16
|
-
of
|
|
16
|
+
of OP_NET transactions, smart contracts, and other OP_NET-related technologies.
|
|
17
17
|
|
|
18
18
|
## Getting Started
|
|
19
19
|
|
|
@@ -50,7 +50,7 @@ of the repository.
|
|
|
50
50
|
|
|
51
51
|
## Usage
|
|
52
52
|
|
|
53
|
-
Here's a basic example of how to use the
|
|
53
|
+
Here's a basic example of how to use the OP_NET Transaction Builder library to create and sign a transaction:
|
|
54
54
|
The following example demonstrates how to create a wBTC transfer transaction.
|
|
55
55
|
|
|
56
56
|
### Import Statements
|
|
@@ -70,13 +70,14 @@ import {
|
|
|
70
70
|
import { networks } from 'bitcoinjs-lib';
|
|
71
71
|
import { BitcoinRPC } from '@btc-vision/bsi-bitcoin-rpc';
|
|
72
72
|
import { ABICoder, BinaryWriter } from '@btc-vision/bsi-binary';
|
|
73
|
+
import { BitcoinNetwork } from '@btc-vision/bsi-common';
|
|
73
74
|
```
|
|
74
75
|
|
|
75
76
|
### Setting Up configurations
|
|
76
77
|
|
|
77
78
|
We must provide the necessary configurations for the network, wallet, and RPC connection:
|
|
78
79
|
|
|
79
|
-
- The opnetNode variable is the URL of the
|
|
80
|
+
- The opnetNode variable is the URL of the OP_NET node.
|
|
80
81
|
- The Testnet variable contains the wallet address, public key, and private key.
|
|
81
82
|
- The config variable inside the testnet object contains the network, host, port, username, and password for the RPC
|
|
82
83
|
connection.
|
|
@@ -200,12 +201,12 @@ if (!secondTxBroadcast) {
|
|
|
200
201
|
}
|
|
201
202
|
```
|
|
202
203
|
|
|
203
|
-
That's it! You have successfully created and broadcasted a transaction using
|
|
204
|
+
That's it! You have successfully created and broadcasted a transaction using OP_NET.
|
|
204
205
|
|
|
205
206
|
## Contribution
|
|
206
207
|
|
|
207
208
|
Contributions are welcome! Please read through the `CONTRIBUTING.md` file for guidelines on how to submit issues,
|
|
208
|
-
feature requests, and pull requests. We appreciate your input and encourage you to help us improve
|
|
209
|
+
feature requests, and pull requests. We appreciate your input and encourage you to help us improve OP_NET.
|
|
209
210
|
|
|
210
211
|
## License
|
|
211
212
|
|
package/browser/_version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "1.0.
|
|
1
|
+
export declare const version = "1.0.2";
|