@btc-vision/transaction 1.7.30 → 1.8.0-alpha.1

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 (40) hide show
  1. package/AUDIT/README.md +9 -0
  2. package/CHANGELOG.md +5 -0
  3. package/README.md +62 -18
  4. package/SECURITY.md +71 -0
  5. package/browser/_version.d.ts +1 -1
  6. package/browser/deterministic/ExtendedAddressMap.d.ts +17 -0
  7. package/browser/index.js +449 -363
  8. package/browser/keypair/Address.d.ts +3 -1
  9. package/browser/mnemonic/Mnemonic.d.ts +1 -1
  10. package/browser/noble-curves.js +1087 -1116
  11. package/browser/noble-hashes.js +25 -25
  12. package/browser/opnet.d.ts +1 -0
  13. package/browser/transaction/browser/WalletNetworks.d.ts +3 -3
  14. package/browser/transaction/browser/types/Unisat.d.ts +4 -4
  15. package/browser/vendors.js +950 -911
  16. package/build/_version.d.ts +1 -1
  17. package/build/_version.js +1 -1
  18. package/build/deterministic/ExtendedAddressMap.d.ts +17 -0
  19. package/build/deterministic/ExtendedAddressMap.js +60 -0
  20. package/build/keypair/Address.d.ts +3 -1
  21. package/build/keypair/Address.js +30 -10
  22. package/build/mnemonic/Mnemonic.d.ts +1 -1
  23. package/build/mnemonic/Mnemonic.js +2 -2
  24. package/build/opnet.d.ts +1 -0
  25. package/build/opnet.js +1 -0
  26. package/build/transaction/browser/WalletNetworks.d.ts +3 -3
  27. package/build/transaction/browser/WalletNetworks.js +3 -3
  28. package/build/transaction/browser/extensions/UnisatSigner.js +3 -3
  29. package/build/transaction/browser/types/Unisat.d.ts +4 -4
  30. package/build/tsconfig.build.tsbuildinfo +1 -1
  31. package/package.json +13 -13
  32. package/src/_version.ts +1 -1
  33. package/src/deterministic/ExtendedAddressMap.ts +83 -0
  34. package/src/keypair/Address.ts +53 -9
  35. package/src/mnemonic/Mnemonic.ts +2 -2
  36. package/src/opnet.ts +1 -0
  37. package/src/transaction/browser/WalletNetworks.ts +3 -3
  38. package/src/transaction/browser/extensions/UnisatSigner.ts +3 -3
  39. package/src/transaction/browser/types/Unisat.ts +4 -4
  40. package/test/derivePath.test.ts +30 -29
@@ -0,0 +1,9 @@
1
+ # Security Audit
2
+
3
+ ## Audit Reports
4
+
5
+ This repository contains the final audit reports for this libary.
6
+
7
+ ## Reporting Security Issues
8
+
9
+ For reporting security vulnerabilities, please see our [Security Policy](../SECURITY.md).
package/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ This changelog is automatically generated from merged pull requests.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # OP_NET - Transaction Builder
1
+ # OPNet - Transaction Builder
2
2
 
3
3
  ![Bitcoin](https://img.shields.io/badge/Bitcoin-000?style=for-the-badge&logo=bitcoin&logoColor=white)
4
4
  ![TypeScript](https://img.shields.io/badge/TypeScript-007ACC?style=for-the-badge&logo=typescript&logoColor=white)
@@ -9,33 +9,53 @@
9
9
 
10
10
  [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
11
11
 
12
- ## Introduction
12
+ ## Overview
13
13
 
14
- The OP_NET Transaction Builder library allows you to create and sign transactions for the OP_NET network. Written in
14
+ This library is a modern and easy-to-use solution for developers looking to work with Bitcoin transactions and OP_NET
15
+ technologies. The OP_NET Transaction Builder library allows you to create and sign transactions for Bitcoin. Written in
15
16
  TypeScript, this library provides a comprehensive set of functions to facilitate the creation, reading, and manipulation
16
17
  of OP_NET transactions, smart contracts, and other OP_NET-related technologies.
17
18
 
18
19
  You can create any sort of transaction, and you don't have to bother about managing signer types or anything
19
20
  complicated.
20
21
 
21
- ## Getting Started
22
+ ## Security Audit
22
23
 
23
- ### Prerequisites
24
+ <p align="center">
25
+ <a href="https://verichains.io">
26
+ <img src="https://raw.githubusercontent.com/btc-vision/contract-logo/refs/heads/main/public-assets/verichains.png" alt="Verichains" width="100"/>
27
+ </a>
28
+ </p>
24
29
 
25
- - Node.js version 24.x or higher
26
- - npm (Node Package Manager)
30
+ <p align="center">
31
+ <a href="https://verichains.io">
32
+ <img src="https://img.shields.io/badge/Security%20Audit-Verichains-4C35E0?style=for-the-badge" alt="Audited by Verichains"/>
33
+ </a>
34
+ <a href="./SECURITY.md">
35
+ <img src="https://img.shields.io/badge/Security-Report-22C55E?style=for-the-badge" alt="Security Report"/>
36
+ </a>
37
+ </p>
38
+
39
+ This library has been professionally audited by [Verichains](https://verichains.io).
40
+
41
+ See [SECURITY.md](./SECURITY.md) for details.
27
42
 
28
- ### Installation
43
+ ## Installation
29
44
 
30
- ```shell
31
- npm i @btc-vision/transaction
45
+ ```bash
46
+ npm install @btc-vision/transaction
32
47
  ```
33
48
 
34
- ### Documentation
49
+ ## Documentation
35
50
 
36
- Documentation is available at [docs.opnet.org](https://docs.opnet.org)
51
+ Documentation is available [here](./documentation/README.md) and on [docs.opnet.org](https://docs.opnet.org).
52
+
53
+ ## Prerequisites
54
+
55
+ - Node.js version 24.x or higher
56
+ - npm (Node Package Manager)
37
57
 
38
- #### Development
58
+ ## Development
39
59
 
40
60
  1. Clone the repository:
41
61
  ```bash
@@ -47,15 +67,39 @@ Documentation is available at [docs.opnet.org](https://docs.opnet.org)
47
67
  ```
48
68
  3. Install the required dependencies:
49
69
  ```bash
50
- npm i
70
+ npm install
51
71
  ```
72
+ 4. Build the project:
73
+ ```bash
74
+ npm run build
75
+ ```
76
+
77
+ ## Contributing
78
+
79
+ 1. Fork the repository
80
+ 2. Create a feature branch
81
+ 3. Make your changes
82
+ 4. Run tests and build
83
+ 5. Submit a pull request
52
84
 
53
- ## Contribution
85
+ See the [pull request template](./.github/PULL_REQUEST_TEMPLATE.md) for requirements.
54
86
 
55
87
  Contributions are welcome! Please read through the `CONTRIBUTING.md` file for guidelines on how to submit issues,
56
- feature requests, and pull requests. We appreciate your input and encourage you to help us improve OP_NET.
88
+ feature requests, and pull requests.
89
+
90
+ ## Reporting Issues
91
+
92
+ - **Bugs**: Use the [bug report template](https://github.com/btc-vision/transaction/issues/new?template=bug_report.yml)
93
+ - **Security**: See [SECURITY.md](./SECURITY.md) - do not open public issues for vulnerabilities
57
94
 
58
95
  ## License
59
96
 
60
- This project is open source and available under the [Apache-2.0 License](LICENSE). If you have any suggestions or
61
- contributions, please feel free to submit a pull request.
97
+ [Apache-2.0](./LICENSE)
98
+
99
+ ## Links
100
+
101
+ - [OPNet](https://opnet.org)
102
+ - [Documentation](https://docs.opnet.org)
103
+ - [GitHub](https://github.com/btc-vision/transaction)
104
+ - [npm](https://www.npmjs.com/package/@btc-vision/transaction)
105
+ - [Verichains](https://verichains.io)
package/SECURITY.md ADDED
@@ -0,0 +1,71 @@
1
+ # Security Policy
2
+
3
+ <p align="center">
4
+ <a href="https://verichains.io">
5
+ <img src="https://raw.githubusercontent.com/btc-vision/contract-logo/refs/heads/main/public-assets/verichains.png" alt="Verichains" width="150"/>
6
+ </a>
7
+ </p>
8
+
9
+ <p align="center">
10
+ <a href="https://verichains.io">
11
+ <img src="https://img.shields.io/badge/Security%20Audit-Verichains-4C35E0?style=for-the-badge" alt="Audited by Verichains"/>
12
+ </a>
13
+ </p>
14
+
15
+ ## Audit Status
16
+
17
+ | Component | Status | Auditor |
18
+ |--------------------|---------|---------------------------------------|
19
+ | transaction | Audited | [Verichains](https://verichains.io) |
20
+
21
+ ## Supported Versions
22
+
23
+ | Version | Status |
24
+ |---------|--------------------|
25
+ | 1.7.x | Supported |
26
+ | < 1.7 | Not supported |
27
+
28
+ ## Reporting a Vulnerability
29
+
30
+ **DO NOT** open a public GitHub issue for security vulnerabilities.
31
+
32
+ Report vulnerabilities through [GitHub Security Advisories](https://github.com/btc-vision/transaction/security/advisories/new).
33
+
34
+ Include:
35
+ - Description of the vulnerability
36
+ - Affected version(s)
37
+ - Steps to reproduce
38
+ - Potential impact
39
+ - Suggested fix (if any)
40
+
41
+ ### Response Timeline
42
+
43
+ | Action | Timeframe |
44
+ |--------------------------|-------------------|
45
+ | Initial response | 48 hours |
46
+ | Vulnerability assessment | 7 days |
47
+ | Patch development | 14-30 days |
48
+ | Public disclosure | After patch |
49
+
50
+ ## Security Scope
51
+
52
+ ### In Scope
53
+
54
+ - Transaction parsing and validation
55
+ - Cryptographic operations (signatures, hashing)
56
+ - Address handling and derivation
57
+ - Network communication protocols
58
+ - UTXO management
59
+ - Script parsing and execution
60
+
61
+ ### Out of Scope
62
+
63
+ - Third-party dependencies (report to respective maintainers)
64
+ - User application logic errors
65
+ - Issues in development/test environments only
66
+
67
+ ## Contact
68
+
69
+ - **Security Issues**: [GitHub Security Advisories](https://github.com/btc-vision/transaction/security/advisories)
70
+ - **General Issues**: [GitHub Issues](https://github.com/btc-vision/transaction/issues)
71
+ - **Website**: [opnet.org](https://opnet.org)
@@ -1 +1 @@
1
- export declare const version = "1.7.30";
1
+ export declare const version = "1.7.31";
@@ -0,0 +1,17 @@
1
+ import { Address } from '../keypair/Address.js';
2
+ export declare class ExtendedAddressMap<V> {
3
+ private items;
4
+ constructor(iterable?: ReadonlyArray<readonly [Address, V]> | null);
5
+ get size(): number;
6
+ set(key: Address, value: V): this;
7
+ get(key: Address): V | undefined;
8
+ has(key: Address): boolean;
9
+ delete(key: Address): boolean;
10
+ clear(): void;
11
+ indexOf(address: Address): number;
12
+ entries(): IterableIterator<[Address, V]>;
13
+ keys(): IterableIterator<Address>;
14
+ values(): IterableIterator<V>;
15
+ forEach(callback: (value: V, key: Address, map: ExtendedAddressMap<V>) => void, thisArg?: unknown): void;
16
+ [Symbol.iterator](): IterableIterator<[Address, V]>;
17
+ }