opnet 1.8.1 → 1.8.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.
Files changed (3) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/README.md +25 -15
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,55 @@
1
1
  # Changelog
2
2
 
3
+ ## [v1.8.1] - 2026-03-07
4
+
5
+ ### Breaking Changes
6
+
7
+ - breaking: upgraded deps, refactor buffer -> uint8array for consistency, upgraded eslint v10. ([#134](https://github.com/btc-vision/opnet/pull/134)) by @BlobMaster41
8
+
9
+ ### Features
10
+
11
+ - Rename targetHash to checksumRoot in epoch interfaces ([#120](https://github.com/btc-vision/opnet/pull/120)) by @BlobMaster41
12
+ - Upgrade/deps add http threader ([#121](https://github.com/btc-vision/opnet/pull/121)) by @BlobMaster41
13
+ - Fix/react native ([#126](https://github.com/btc-vision/opnet/pull/126)) by @BlobMaster41
14
+ - Add constant/payable validation to CallResult ([#131](https://github.com/btc-vision/opnet/pull/131)) by @BlobMaster41
15
+ - breaking: upgraded deps, refactor buffer -> uint8array for consistency, upgraded eslint v10. ([#134](https://github.com/btc-vision/opnet/pull/134)) by @BlobMaster41
16
+ - Normalize hex strings; strip 0x prefix safely ([#135](https://github.com/btc-vision/opnet/pull/135)) by @BlobMaster41
17
+ - feat: add mempool API and WebSocket support ([#136](https://github.com/btc-vision/opnet/pull/136)) by @BlobMaster41
18
+ - Rework/mempool ([#137](https://github.com/btc-vision/opnet/pull/137)) by @BlobMaster41
19
+
20
+ ### Bug Fixes
21
+
22
+ - Upgrade/deps add http threader ([#121](https://github.com/btc-vision/opnet/pull/121)) by @BlobMaster41
23
+ - Fix/react native ([#126](https://github.com/btc-vision/opnet/pull/126)) by @BlobMaster41
24
+ - Normalize hex strings; strip 0x prefix safely ([#135](https://github.com/btc-vision/opnet/pull/135)) by @BlobMaster41
25
+
26
+ ### Documentation
27
+
28
+ - Upgrade/deps add http threader ([#121](https://github.com/btc-vision/opnet/pull/121)) by @BlobMaster41
29
+ - Add constant/payable validation to CallResult ([#131](https://github.com/btc-vision/opnet/pull/131)) by @BlobMaster41
30
+ - docs: add ABI flags and update contract APIs ([#132](https://github.com/btc-vision/opnet/pull/132)) by @BlobMaster41
31
+ - breaking: upgraded deps, refactor buffer -> uint8array for consistency, upgraded eslint v10. ([#134](https://github.com/btc-vision/opnet/pull/134)) by @BlobMaster41
32
+ - feat: add mempool API and WebSocket support ([#136](https://github.com/btc-vision/opnet/pull/136)) by @BlobMaster41
33
+
34
+ ### Other Changes
35
+
36
+ - Refactor ABI interfaces and events for OPNet and stablecoins ([#110](https://github.com/btc-vision/opnet/pull/110)) by @BlobMaster41
37
+ - Update docs for mnemonic-based wallet usage and add tables of contents ([#114](https://github.com/btc-vision/opnet/pull/114)) by @BlobMaster41
38
+ - Bump version to 1.8.0 ([#115](https://github.com/btc-vision/opnet/pull/115)) by @BlobMaster41
39
+ - Add security policy, templates, and extended ABI support ([#118](https://github.com/btc-vision/opnet/pull/118)) by @BlobMaster41
40
+ - update motochef factory and template motochef abi/interface ([#117](https://github.com/btc-vision/opnet/pull/117)) by @icedevera
41
+ - Bump version to 1.8.1-alpha.0 ([#119](https://github.com/btc-vision/opnet/pull/119)) by @BlobMaster41
42
+ - ⬆️(deps-dev): Bump vite-plugin-node-polyfills from 0.24.0 to 0.25.0 in the dev-deps group ([#116](https://github.com/btc-vision/opnet/pull/116)) by @dependabot[bot]
43
+ - Bump btc-vision deps and relax signer type ([#124](https://github.com/btc-vision/opnet/pull/124)) by @BlobMaster41
44
+ - Tuple/implmentation ([#127](https://github.com/btc-vision/opnet/pull/127)) by @BlobMaster41
45
+ - Bump version and disable threaded parsing ([#128](https://github.com/btc-vision/opnet/pull/128)) by @BlobMaster41
46
+ - Added constant to ABI ([#133](https://github.com/btc-vision/opnet/pull/133)) by @BlobMaster41
47
+ - Bump version and relax getPublicKeyInfo return ([#141](https://github.com/btc-vision/opnet/pull/141)) by @BlobMaster41
48
+ - ⬆️(deps): Bump bignumber.js from 9.3.1 to 10.0.2 ([#140](https://github.com/btc-vision/opnet/pull/140)) by @dependabot[bot]
49
+
50
+
51
+
52
+
3
53
  ## [v1.8.1-rc.17] - 2026-02-27
4
54
 
5
55
  - No changes
package/README.md CHANGED
@@ -7,7 +7,8 @@
7
7
 
8
8
  [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
9
9
 
10
- The official client library for building Bitcoin-based applications on OPNet. Full TypeScript support with type-safe contract interactions.
10
+ The official client library for building Bitcoin-based applications on OPNet.
11
+ Full TypeScript support with type-safe contract interactions.
11
12
 
12
13
  ## Security Audit
13
14
 
@@ -26,7 +27,8 @@ The official client library for building Bitcoin-based applications on OPNet. Fu
26
27
  </a>
27
28
  </p>
28
29
 
29
- This library has been professionally audited by [Verichains](https://verichains.io).
30
+ This library has been professionally audited
31
+ by [Verichains](https://verichains.io).
30
32
 
31
33
  See [SECURITY.md](./SECURITY.md) for details.
32
34
 
@@ -41,18 +43,22 @@ npm install opnet @btc-vision/transaction @btc-vision/bitcoin
41
43
  Check out the full documentation in [`/docs`](./docs)!
42
44
 
43
45
  - [Getting Started](./docs/getting-started/quick-start.md)
44
- - [Providers](./docs/providers/json-rpc-provider.md) - JSON-RPC & WebSocket connections
45
- - [Smart Contracts](./docs/contracts/overview.md) - Contract interactions & transactions
46
+ - [Providers](./docs/providers/json-rpc-provider.md) - JSON-RPC & WebSocket
47
+ connections
48
+ - [Smart Contracts](./docs/contracts/overview.md) - Contract interactions &
49
+ transactions
46
50
  - [UTXO Management](./docs/bitcoin/utxos.md) - Bitcoin UTXO handling
47
51
  - [Offline Signing](./docs/contracts/offline-signing.md) - Cold wallet support
48
- - [ABI Reference](./docs/abi-reference/abi-overview.md) - OP20, OP721, MotoSwap ABIs
52
+ - [ABI Reference](./docs/abi-reference/abi-overview.md) - OP20, OP721, MotoSwap
53
+ ABIs
49
54
  - [API Reference](./docs/api-reference/provider-api.md) - Full API documentation
50
55
 
51
56
  ## RPC Endpoints
52
57
 
53
- | Network | URL |
54
- |---------|-----|
58
+ | Network | URL |
59
+ |---------|-----------------------------|
55
60
  | Mainnet | `https://mainnet.opnet.org` |
61
+ | Testnet | `https://testnet.opnet.org` |
56
62
  | Regtest | `https://regtest.opnet.org` |
57
63
 
58
64
  ## Quick Start
@@ -63,16 +69,17 @@ import { AddressTypes, Mnemonic, MLDSASecurityLevel } from '@btc-vision/transact
63
69
  import { networks } from '@btc-vision/bitcoin';
64
70
 
65
71
  // Connect to OPNet
66
- const provider = new JSONRpcProvider('https://regtest.opnet.org', networks.regtest);
72
+ const provider = new JSONRpcProvider('https://testnet.opnet.org', networks.
73
+ opnetTestnet);
67
74
 
68
75
  // Create wallet from mnemonic
69
76
  const mnemonic = new Mnemonic(
70
77
  'your twenty four word seed phrase goes here ...',
71
78
  '',
72
- networks.regtest,
79
+ networks.opnetTestnet,
73
80
  MLDSASecurityLevel.LEVEL2,
74
81
  );
75
- const wallet = mnemonic.deriveUnisat(AddressTypes.P2TR, 0);
82
+ const wallet = mnemonic.deriveOPWallet(AddressTypes.P2TR, 0);
76
83
  const myAddress = wallet.address;
77
84
 
78
85
  // Interact with a token contract
@@ -80,7 +87,7 @@ const token = getContract<IOP20Contract>(
80
87
  'op1...', // contract address
81
88
  OP_20_ABI,
82
89
  provider,
83
- networks.regtest,
90
+ networks.opnetTestnet,
84
91
  myAddress
85
92
  );
86
93
 
@@ -105,7 +112,7 @@ const tx = await simulation.sendTransaction({
105
112
  refundTo: wallet.p2tr,
106
113
  maximumAllowedSatToSpend: 50000n,
107
114
  feeRate: 10,
108
- network: networks.regtest,
115
+ network: networks.opnetTestnet,
109
116
  });
110
117
 
111
118
  console.log('TX ID:', tx.transactionId);
@@ -133,12 +140,15 @@ npm run build
133
140
  4. Run tests: `npm test`
134
141
  5. Submit a pull request
135
142
 
136
- See the [pull request template](./.github/PULL_REQUEST_TEMPLATE.md) for requirements.
143
+ See the [pull request template](./.github/PULL_REQUEST_TEMPLATE.md) for
144
+ requirements.
137
145
 
138
146
  ## Reporting Issues
139
147
 
140
- - **Bugs**: Use the [bug report template](https://github.com/btc-vision/opnet/issues/new?template=bug_report.yml)
141
- - **Security**: See [SECURITY.md](./SECURITY.md) - do not open public issues for vulnerabilities
148
+ - **Bugs**: Use
149
+ the [bug report template](https://github.com/btc-vision/opnet/issues/new?template=bug_report.yml)
150
+ - **Security**: See [SECURITY.md](./SECURITY.md) - do not open public issues for
151
+ vulnerabilities
142
152
 
143
153
  ## License
144
154
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "opnet",
3
3
  "type": "module",
4
- "version": "1.8.1",
4
+ "version": "1.8.2",
5
5
  "author": "OP_NET",
6
6
  "description": "The perfect library for building Bitcoin-based applications.",
7
7
  "engines": {