opnet 1.8.0 → 1.8.1-beta.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 (51) hide show
  1. package/.github/ISSUE_TEMPLATE/bug_report.yml +90 -0
  2. package/.github/ISSUE_TEMPLATE/config.yml +8 -0
  3. package/.github/PULL_REQUEST_TEMPLATE.md +43 -0
  4. package/.github/changelog-config.json +45 -0
  5. package/.github/workflows/ci.yml +153 -10
  6. package/CHANGELOG.md +20 -0
  7. package/CONTRIBUTING.md +47 -40
  8. package/README.md +40 -5
  9. package/SECURITY.md +70 -0
  10. package/browser/_version.d.ts +1 -1
  11. package/browser/abi/shared/interfaces/motoswap/IMotoChefFactory.d.ts +2 -2
  12. package/browser/abi/shared/interfaces/motoswap/ITemplateMotoChef.d.ts +1 -1
  13. package/browser/common/CommonTypes.d.ts +2 -2
  14. package/browser/contracts/CallResultSerializer.d.ts +1 -1
  15. package/browser/epoch/interfaces/EpochSubmissionParams.d.ts +1 -1
  16. package/browser/index.js +116 -8
  17. package/browser/noble-curves.js +2 -35
  18. package/browser/noble-hashes.js +1 -1
  19. package/browser/protobuf.js +1 -1
  20. package/browser/vendors.js +351 -34
  21. package/build/_version.d.ts +1 -1
  22. package/build/_version.js +1 -1
  23. package/build/abi/shared/interfaces/motoswap/IMotoChefFactory.d.ts +2 -2
  24. package/build/abi/shared/interfaces/motoswap/ITemplateMotoChef.d.ts +1 -1
  25. package/build/abi/shared/json/motoswap/MOTOCHEF_FACTORY_ABI.js +1 -2
  26. package/build/abi/shared/json/motoswap/TEMPLATE_MOTOCHEF_ABI.js +0 -2
  27. package/build/common/CommonTypes.d.ts +2 -2
  28. package/build/contracts/CallResultSerializer.d.ts +1 -1
  29. package/build/contracts/CallResultSerializer.js +2 -2
  30. package/build/contracts/Contract.js +88 -0
  31. package/build/contracts/TypeToStr.js +11 -3
  32. package/build/epoch/interfaces/EpochSubmissionParams.d.ts +1 -1
  33. package/build/providers/AbstractRpcProvider.js +2 -2
  34. package/build/tsconfig.build.tsbuildinfo +1 -1
  35. package/docs/README.md +1 -1
  36. package/docs/blocks/block-operations.md +59 -0
  37. package/docs/contracts/offline-signing.md +30 -39
  38. package/package.json +22 -22
  39. package/src/_version.ts +1 -1
  40. package/src/abi/shared/interfaces/motoswap/IMotoChefFactory.ts +1 -2
  41. package/src/abi/shared/interfaces/motoswap/ITemplateMotoChef.ts +0 -2
  42. package/src/abi/shared/json/motoswap/MOTOCHEF_FACTORY_ABI.ts +1 -2
  43. package/src/abi/shared/json/motoswap/TEMPLATE_MOTOCHEF_ABI.ts +0 -2
  44. package/src/common/CommonTypes.ts +5 -2
  45. package/src/contracts/CallResultSerializer.ts +3 -3
  46. package/src/contracts/Contract.ts +104 -0
  47. package/src/contracts/TypeToStr.ts +28 -3
  48. package/src/epoch/interfaces/EpochSubmissionParams.ts +1 -1
  49. package/src/providers/AbstractRpcProvider.ts +6 -14
  50. package/test/call-result-serializer.test.ts +62 -43
  51. package/cjs/package.json +0 -3
@@ -0,0 +1,90 @@
1
+ name: Bug Report
2
+ description: Report a bug in opnet
3
+ title: "[Bug]: "
4
+ labels: ["bug", "triage"]
5
+ body:
6
+ - type: markdown
7
+ attributes:
8
+ value: |
9
+ Thanks for taking the time to report a bug.
10
+
11
+ **Security Notice**: If this is a security vulnerability, DO NOT create a public issue. Report it privately via [GitHub Security Advisories](https://github.com/btc-vision/opnet/security/advisories/new).
12
+
13
+ - type: textarea
14
+ id: description
15
+ attributes:
16
+ label: Bug Description
17
+ description: A clear and concise description of the bug.
18
+ placeholder: Describe the bug...
19
+ validations:
20
+ required: true
21
+
22
+ - type: textarea
23
+ id: reproduction
24
+ attributes:
25
+ label: Steps to Reproduce
26
+ description: Steps to reproduce the behavior.
27
+ placeholder: |
28
+ 1. ...
29
+ 2. ...
30
+ 3. ...
31
+ validations:
32
+ required: true
33
+
34
+ - type: textarea
35
+ id: expected
36
+ attributes:
37
+ label: Expected Behavior
38
+ description: What did you expect to happen?
39
+ validations:
40
+ required: true
41
+
42
+ - type: textarea
43
+ id: actual
44
+ attributes:
45
+ label: Actual Behavior
46
+ description: What actually happened?
47
+ validations:
48
+ required: true
49
+
50
+ - type: input
51
+ id: version
52
+ attributes:
53
+ label: opnet Version
54
+ description: What version of opnet are you using?
55
+ placeholder: "1.8.0"
56
+ validations:
57
+ required: true
58
+
59
+ - type: input
60
+ id: node-version
61
+ attributes:
62
+ label: Node.js Version
63
+ description: What version of Node.js are you using?
64
+ placeholder: "22.0.0"
65
+ validations:
66
+ required: true
67
+
68
+ - type: textarea
69
+ id: code
70
+ attributes:
71
+ label: Code Example
72
+ description: Minimal code that reproduces the issue.
73
+ render: typescript
74
+
75
+ - type: textarea
76
+ id: logs
77
+ attributes:
78
+ label: Relevant Logs
79
+ description: Please copy and paste any relevant log output.
80
+ render: shell
81
+
82
+ - type: checkboxes
83
+ id: terms
84
+ attributes:
85
+ label: Checklist
86
+ options:
87
+ - label: I have searched existing issues to ensure this bug hasn't been reported
88
+ required: true
89
+ - label: This is NOT a security vulnerability (those should be reported privately)
90
+ required: true
@@ -0,0 +1,8 @@
1
+ blank_issues_enabled: true
2
+ contact_links:
3
+ - name: Security Vulnerability
4
+ url: https://github.com/btc-vision/opnet/security/advisories/new
5
+ about: Report a security vulnerability privately. DO NOT create a public issue for security vulnerabilities.
6
+ - name: OPNet Website
7
+ url: https://opnet.org/
8
+ about: Visit the OPNet homepage for documentation and support.
@@ -0,0 +1,43 @@
1
+ ## Description
2
+ <!-- Brief description of the changes in this PR -->
3
+
4
+ ## Type of Change
5
+ <!-- Mark the relevant option with an "x" -->
6
+
7
+ - [ ] Bug fix (non-breaking change that fixes an issue)
8
+ - [ ] New feature (non-breaking change that adds functionality)
9
+ - [ ] Breaking change (fix or feature that would cause existing functionality to change)
10
+ - [ ] Performance improvement
11
+ - [ ] Refactoring (no functional changes)
12
+ - [ ] Documentation update
13
+ - [ ] CI/CD changes
14
+ - [ ] Dependencies update
15
+
16
+ ## Checklist
17
+
18
+ ### Build & Tests
19
+ - [ ] `npm install` completes without errors
20
+ - [ ] `npm test` passes all tests
21
+
22
+ ### Code Quality
23
+ - [ ] Code follows the project's coding standards
24
+ - [ ] No new compiler warnings introduced
25
+ - [ ] Error handling is appropriate
26
+
27
+ ### Documentation
28
+ - [ ] Code comments added for complex logic
29
+ - [ ] Public APIs are documented
30
+ - [ ] README updated (if applicable)
31
+
32
+ ### Security
33
+ - [ ] No sensitive data (keys, credentials) committed
34
+ - [ ] No new security vulnerabilities introduced
35
+
36
+ ## Testing
37
+ <!-- Describe how you tested these changes -->
38
+
39
+ ## Related Issues
40
+ <!-- Link any related issues: Fixes #123, Relates to #456 -->
41
+
42
+ ---
43
+ By submitting this PR, I confirm that my contribution is made under the terms of the project's license.
@@ -0,0 +1,45 @@
1
+ {
2
+ "categories": [
3
+ {
4
+ "title": "### Breaking Changes",
5
+ "labels": ["breaking", "breaking-change", "BREAKING-CHANGE"]
6
+ },
7
+ {
8
+ "title": "### Features",
9
+ "labels": ["feature", "feat", "enhancement"]
10
+ },
11
+ {
12
+ "title": "### Bug Fixes",
13
+ "labels": ["bug", "fix", "bugfix"]
14
+ },
15
+ {
16
+ "title": "### Performance",
17
+ "labels": ["performance", "perf"]
18
+ },
19
+ {
20
+ "title": "### Documentation",
21
+ "labels": ["documentation", "docs"]
22
+ },
23
+ {
24
+ "title": "### Dependencies",
25
+ "labels": ["dependencies", "deps"]
26
+ },
27
+ {
28
+ "title": "### Other Changes",
29
+ "labels": []
30
+ }
31
+ ],
32
+ "sort": {
33
+ "order": "ASC",
34
+ "on_property": "mergedAt"
35
+ },
36
+ "template": "#{{CHANGELOG}}",
37
+ "pr_template": "- #{{TITLE}} (#{{NUMBER}}) by @#{{AUTHOR}}",
38
+ "empty_template": "- No changes",
39
+ "max_tags_to_fetch": 200,
40
+ "max_pull_requests": 200,
41
+ "max_back_track_time_days": 365,
42
+ "tag_resolver": {
43
+ "method": "semver"
44
+ }
45
+ }
@@ -3,10 +3,10 @@ name: CI for OPNET
3
3
  on:
4
4
  push:
5
5
  tags:
6
- - '*'
6
+ - 'v*'
7
7
 
8
8
  jobs:
9
- build_and_publish:
9
+ publish:
10
10
  runs-on: ubuntu-latest
11
11
 
12
12
  permissions:
@@ -15,10 +15,12 @@ jobs:
15
15
 
16
16
  steps:
17
17
  - name: Checkout code
18
- uses: actions/checkout@v4
18
+ uses: actions/checkout@v6
19
+ with:
20
+ fetch-depth: 0
19
21
 
20
22
  - name: Setup Node.js
21
- uses: actions/setup-node@v4
23
+ uses: actions/setup-node@v6
22
24
  with:
23
25
  node-version: '24.x'
24
26
  registry-url: 'https://registry.npmjs.org'
@@ -35,16 +37,157 @@ jobs:
35
37
  - name: Build browser assets
36
38
  run: npm run browserBuild
37
39
 
40
+ - name: Determine npm tag
41
+ id: npm_tag
42
+ run: |
43
+ VERSION="${{ github.ref_name }}"
44
+ if [[ "$VERSION" == *"-alpha"* ]]; then
45
+ echo "tag=alpha" >> $GITHUB_OUTPUT
46
+ elif [[ "$VERSION" == *"-beta"* ]]; then
47
+ echo "tag=beta" >> $GITHUB_OUTPUT
48
+ elif [[ "$VERSION" == *"-rc"* ]]; then
49
+ echo "tag=rc" >> $GITHUB_OUTPUT
50
+ else
51
+ echo "tag=latest" >> $GITHUB_OUTPUT
52
+ fi
53
+ echo "Determined npm tag: $(cat $GITHUB_OUTPUT | grep tag | cut -d= -f2)"
54
+
38
55
  - name: Publish to npm
39
- run: npm publish --access public
56
+ run: npm publish --access public --tag ${{ steps.npm_tag.outputs.tag }}
57
+ env:
58
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
59
+
60
+ release:
61
+ runs-on: ubuntu-latest
62
+ needs: publish
63
+
64
+ permissions:
65
+ contents: write
66
+
67
+ steps:
68
+ - name: Checkout code
69
+ uses: actions/checkout@v6
70
+ with:
71
+ fetch-depth: 0
72
+
73
+ - name: Generate changelog
74
+ id: changelog
75
+ uses: mikepenz/release-changelog-builder-action@v6
76
+ with:
77
+ configurationJson: |
78
+ {
79
+ "categories": [
80
+ {
81
+ "title": "### Breaking Changes",
82
+ "labels": ["breaking", "breaking-change", "BREAKING-CHANGE"]
83
+ },
84
+ {
85
+ "title": "### Features",
86
+ "labels": ["feature", "feat", "enhancement"]
87
+ },
88
+ {
89
+ "title": "### Bug Fixes",
90
+ "labels": ["bug", "fix", "bugfix"]
91
+ },
92
+ {
93
+ "title": "### Performance",
94
+ "labels": ["performance", "perf"]
95
+ },
96
+ {
97
+ "title": "### Documentation",
98
+ "labels": ["documentation", "docs"]
99
+ },
100
+ {
101
+ "title": "### Dependencies",
102
+ "labels": ["dependencies", "deps"]
103
+ },
104
+ {
105
+ "title": "### Other Changes",
106
+ "labels": []
107
+ }
108
+ ],
109
+ "sort": {
110
+ "order": "ASC",
111
+ "on_property": "mergedAt"
112
+ },
113
+ "template": "#{{CHANGELOG}}",
114
+ "pr_template": "- #{{TITLE}} ([##{{NUMBER}}](#{{URL}})) by @#{{AUTHOR}}",
115
+ "empty_template": "- No changes",
116
+ "max_tags_to_fetch": 200,
117
+ "max_pull_requests": 200,
118
+ "max_back_track_time_days": 365,
119
+ "tag_resolver": {
120
+ "method": "semver"
121
+ }
122
+ }
123
+ env:
124
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
125
+
126
+ - name: Update CHANGELOG.md
127
+ env:
128
+ CHANGELOG_CONTENT: ${{ steps.changelog.outputs.changelog }}
129
+ run: |
130
+ TAG="${{ github.ref_name }}"
131
+ DATE=$(date +%Y-%m-%d)
132
+ NEW_HEADER="## [$TAG] - $DATE"
133
+
134
+ # Write changelog content to temp file using env var (avoids shell escaping)
135
+ printf '%s\n' "$CHANGELOG_CONTENT" > /tmp/new_entry.md
136
+
137
+ if [ -f CHANGELOG.md ]; then
138
+ # Create new file with entry inserted after header line
139
+ {
140
+ head -n 1 CHANGELOG.md
141
+ echo ""
142
+ echo "$NEW_HEADER"
143
+ echo ""
144
+ cat /tmp/new_entry.md
145
+ echo ""
146
+ tail -n +2 CHANGELOG.md
147
+ } > /tmp/CHANGELOG_NEW.md
148
+ mv /tmp/CHANGELOG_NEW.md CHANGELOG.md
149
+ else
150
+ # Create new CHANGELOG.md
151
+ {
152
+ echo "# Changelog"
153
+ echo ""
154
+ echo "All notable changes to this project will be documented in this file."
155
+ echo ""
156
+ echo "This changelog is automatically generated from merged pull requests."
157
+ echo ""
158
+ echo "$NEW_HEADER"
159
+ echo ""
160
+ cat /tmp/new_entry.md
161
+ } > CHANGELOG.md
162
+ fi
163
+
164
+ rm -f /tmp/new_entry.md
165
+
166
+ - name: Commit changelog
167
+ run: |
168
+ git config user.name "github-actions[bot]"
169
+ git config user.email "github-actions[bot]@users.noreply.github.com"
170
+ git add CHANGELOG.md
171
+ git diff --staged --quiet || git commit -m "docs: update CHANGELOG.md for ${{ github.ref_name }}"
172
+ git push origin HEAD:main || echo "No changes to push or push failed"
173
+
174
+ - name: Determine if prerelease
175
+ id: prerelease
176
+ run: |
177
+ VERSION="${{ github.ref_name }}"
178
+ if [[ "$VERSION" == *"-alpha"* ]] || [[ "$VERSION" == *"-beta"* ]] || [[ "$VERSION" == *"-rc"* ]]; then
179
+ echo "is_prerelease=true" >> $GITHUB_OUTPUT
180
+ else
181
+ echo "is_prerelease=false" >> $GITHUB_OUTPUT
182
+ fi
40
183
 
41
184
  - name: Create GitHub Release
42
- uses: actions/create-release@v1
185
+ uses: softprops/action-gh-release@v2
43
186
  with:
44
187
  tag_name: ${{ github.ref_name }}
45
- release_name: Release ${{ github.ref_name }}
46
- body: |
47
- Automated release for OPNET.
188
+ name: Release ${{ github.ref_name }}
189
+ body: ${{ steps.changelog.outputs.changelog }}
190
+ prerelease: ${{ steps.prerelease.outputs.is_prerelease == 'true' }}
191
+ generate_release_notes: false
48
192
  env:
49
193
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50
-
package/CHANGELOG.md ADDED
@@ -0,0 +1,20 @@
1
+ # Changelog
2
+
3
+ ## [v1.8.1-alpha.0] - 2026-01-21
4
+
5
+ ### Other Changes
6
+
7
+ - Refactor ABI interfaces and events for OPNet and stablecoins ([#110](https://github.com/btc-vision/opnet/pull/110)) by @BlobMaster41
8
+ - Update docs for mnemonic-based wallet usage and add tables of contents ([#114](https://github.com/btc-vision/opnet/pull/114)) by @BlobMaster41
9
+ - Bump version to 1.8.0 ([#115](https://github.com/btc-vision/opnet/pull/115)) by @BlobMaster41
10
+ - Add security policy, templates, and extended ABI support ([#118](https://github.com/btc-vision/opnet/pull/118)) by @BlobMaster41
11
+ - update motochef factory and template motochef abi/interface ([#117](https://github.com/btc-vision/opnet/pull/117)) by @icedevera
12
+ - Bump version to 1.8.1-alpha.0 ([#119](https://github.com/btc-vision/opnet/pull/119)) by @BlobMaster41
13
+ - ⬆️(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]
14
+
15
+
16
+
17
+
18
+ All notable changes to this project will be documented in this file.
19
+
20
+ This changelog is automatically generated from merged pull requests.
package/CONTRIBUTING.md CHANGED
@@ -1,71 +1,78 @@
1
1
  # Contributing Guidelines
2
2
 
3
- Thank you for considering contributing to our project! Please take a moment to
4
- review the following guidelines before submitting your contribution.
3
+ Thank you for considering contributing to OPNet! Please take a moment to review the following guidelines before submitting your contribution.
4
+
5
+ ## Security
6
+
7
+ **DO NOT** open public issues for security vulnerabilities. Report them privately via [GitHub Security Advisories](https://github.com/btc-vision/opnet/security/advisories/new).
8
+
9
+ See [SECURITY.md](./SECURITY.md) for our full security policy.
5
10
 
6
11
  ## Pull Requests
7
12
 
8
- When submitting a pull request, please make sure to follow these guidelines:
13
+ When submitting a pull request, please use our [pull request template](./.github/PULL_REQUEST_TEMPLATE.md) and follow these guidelines:
9
14
 
10
15
  ### Before You Begin
11
16
 
12
- 1. **Fork the repository**: If you haven't already, fork the repository to your
13
- GitHub account.
17
+ 1. **Fork the repository**: If you haven't already, fork the repository to your GitHub account.
14
18
 
15
- 2. **Create a new branch**: Create a new branch for your feature or bug fix.
16
- This helps keep the main branch clean and makes it easier to review your
17
- changes.
19
+ 2. **Create a new branch**: Create a new branch for your feature or bug fix. This helps keep the main branch clean and makes it easier to review your changes.
18
20
 
19
- 3. **Ensure your code is up-to-date**: Before starting work, make sure your
20
- forked repository is up-to-date with the latest changes from the main
21
- repository.
21
+ 3. **Ensure your code is up-to-date**: Before starting work, make sure your forked repository is up-to-date with the latest changes from the main repository.
22
22
 
23
23
  ### Making Changes
24
24
 
25
- 1. **Follow coding conventions**: Make sure your code follows the existing
26
- coding style and conventions used in the project.
25
+ 1. **Follow coding conventions**: Make sure your code follows the existing coding style and conventions used in the project.
27
26
 
28
- 2. **Write descriptive commit messages**: Write clear and descriptive commit
29
- messages that explain the purpose of your changes.
27
+ 2. **Write descriptive commit messages**: Write clear and descriptive commit messages that explain the purpose of your changes.
30
28
 
31
- 3. **Test your changes**: Before submitting your pull request, make sure to test
32
- your changes thoroughly to ensure they work as expected.
29
+ 3. **Test your changes**: Before submitting your pull request, make sure to test your changes thoroughly:
30
+ ```bash
31
+ npm install
32
+ npm test
33
+ npm run build
34
+ ```
33
35
 
34
36
  ### Submitting the Pull Request
35
37
 
36
- 1. **Create a descriptive title**: Use a clear and descriptive title for your
37
- pull request that summarizes the purpose of your changes.
38
+ 1. **Create a descriptive title**: Use a clear and descriptive title for your pull request that summarizes the purpose of your changes.
38
39
 
39
- 2. **Provide a detailed description**: Include a detailed description of the
40
- changes you've made and any relevant context that reviewers should know.
40
+ 2. **Complete the PR template**: Fill out all sections of the pull request template, including the type of change and checklist items.
41
41
 
42
- 3. **Link related issues**: If your pull request addresses a specific issue,
43
- make sure to reference it in the description using GitHub's issue linking
44
- syntax (`#issue_number`).
42
+ 3. **Link related issues**: If your pull request addresses a specific issue, make sure to reference it in the description using GitHub's issue linking syntax (`Fixes #123` or `Relates to #456`).
45
43
 
46
- 4. **Review and address feedback**: Be responsive to any feedback or comments
47
- you receive on your pull request and make any necessary changes.
44
+ 4. **Review and address feedback**: Be responsive to any feedback or comments you receive on your pull request and make any necessary changes.
48
45
 
49
46
  ## Issues
50
47
 
51
- When submitting an issue, please provide as much information as possible to help
52
- us understand and address the problem. Follow these guidelines when creating an
53
- issue:
48
+ When submitting an issue, please use the appropriate template:
49
+
50
+ - **Bug reports**: Use the [bug report template](https://github.com/btc-vision/opnet/issues/new?template=bug_report.yml)
51
+ - **Feature requests**: Use the [feature request template](https://github.com/btc-vision/opnet/issues/new?template=feature_request.md)
52
+
53
+ ### Guidelines for Issues
54
+
55
+ 1. **Use a descriptive title**: Use a clear and descriptive title that summarizes the issue you're experiencing.
56
+
57
+ 2. **Provide detailed steps to reproduce**: Include detailed steps to reproduce the issue, including any relevant code or configuration.
58
+
59
+ 3. **Include relevant information**: Provide any relevant information such as error messages, screenshots, or logs that can help diagnose the problem.
60
+
61
+ 4. **Specify your environment**: Include your Node.js version and opnet version in bug reports.
54
62
 
55
- 1. **Use a descriptive title**: Use a clear and descriptive title that
56
- summarizes the issue you're experiencing.
63
+ 5. **Check for existing issues**: Before submitting a new issue, please check if a similar issue has already been reported to avoid duplicates.
57
64
 
58
- 2. **Provide detailed steps to reproduce**: Include detailed steps to reproduce
59
- the issue, including any relevant code or configuration.
65
+ ## Development Setup
60
66
 
61
- 3. **Include relevant information**: Provide any relevant information such as
62
- error messages, screenshots, or logs that can help diagnose the problem.
67
+ ```bash
68
+ git clone https://github.com/btc-vision/opnet.git
69
+ cd opnet
70
+ npm install
71
+ npm run build
72
+ ```
63
73
 
64
- 4. **Specify your environment**: If the issue is related to a specific
65
- environment (e.g., operating system, browser), please specify it in your
66
- issue description.
74
+ ## License
67
75
 
68
- 5. **Check for existing issues**: Before submitting a new issue, please check if
69
- a similar issue has already been reported to avoid duplicates.
76
+ By contributing, you agree that your contributions will be licensed under the project's [Apache-2.0](./LICENSE) license.
70
77
 
71
78
  Thank you for your contributions!
package/README.md CHANGED
@@ -9,6 +9,27 @@
9
9
 
10
10
  The official client library for building Bitcoin-based applications on OPNet. Full TypeScript support with type-safe contract interactions.
11
11
 
12
+ ## Security Audit
13
+
14
+ <p align="center">
15
+ <a href="https://verichains.io">
16
+ <img src="https://raw.githubusercontent.com/btc-vision/contract-logo/refs/heads/main/public-assets/verichains.png" alt="Verichains" width="100"/>
17
+ </a>
18
+ </p>
19
+
20
+ <p align="center">
21
+ <a href="https://verichains.io">
22
+ <img src="https://img.shields.io/badge/Security%20Audit-Verichains-4C35E0?style=for-the-badge" alt="Audited by Verichains"/>
23
+ </a>
24
+ <a href="./SECURITY.md">
25
+ <img src="https://img.shields.io/badge/Security-Report-22C55E?style=for-the-badge" alt="Security Report"/>
26
+ </a>
27
+ </p>
28
+
29
+ This library has been professionally audited by [Verichains](https://verichains.io).
30
+
31
+ See [SECURITY.md](./SECURITY.md) for details.
32
+
12
33
  ## Installation
13
34
 
14
35
  ```bash
@@ -104,15 +125,29 @@ npm install
104
125
  npm run build
105
126
  ```
106
127
 
107
- ## Links
128
+ ## Contributing
108
129
 
109
- - [OPNet Website](https://opnet.org)
110
- - [GitHub](https://github.com/btc-vision/opnet)
130
+ 1. Fork the repository
131
+ 2. Create a feature branch
132
+ 3. Make your changes
133
+ 4. Run tests: `npm test`
134
+ 5. Submit a pull request
111
135
 
112
- ## Contributing
136
+ See the [pull request template](./.github/PULL_REQUEST_TEMPLATE.md) for requirements.
113
137
 
114
- Contributions welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
138
+ ## Reporting Issues
139
+
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
115
142
 
116
143
  ## License
117
144
 
118
145
  [Apache-2.0](LICENSE)
146
+
147
+ ## Links
148
+
149
+ - [OPNet](https://opnet.org)
150
+ - [Documentation](./docs/)
151
+ - [GitHub](https://github.com/btc-vision/opnet)
152
+ - [npm](https://www.npmjs.com/package/opnet)
153
+ - [Verichains](https://verichains.io)
package/SECURITY.md ADDED
@@ -0,0 +1,70 @@
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
+ | opnet | Audited | [Verichains](https://verichains.io) |
20
+
21
+ ## Supported Versions
22
+
23
+ | Version | Status |
24
+ |---------|---------------|
25
+ | 1.8.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/opnet/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
+ - Provider implementations (JSON-RPC, WebSocket)
55
+ - Contract interactions and ABI encoding/decoding
56
+ - Transaction building and signing
57
+ - UTXO management
58
+ - Cryptographic operations
59
+
60
+ ### Out of Scope
61
+
62
+ - Third-party dependencies (report to respective maintainers)
63
+ - User application logic errors
64
+ - Issues in development/test environments only
65
+
66
+ ## Contact
67
+
68
+ - **Security Issues**: [GitHub Security Advisories](https://github.com/btc-vision/opnet/security/advisories)
69
+ - **General Issues**: [GitHub Issues](https://github.com/btc-vision/opnet/issues)
70
+ - **Website**: [opnet.org](https://opnet.org)
@@ -1 +1 @@
1
- export declare const version = "1.8.0";
1
+ export declare const version = "1.8.1-beta.1";
@@ -79,14 +79,14 @@ export type OnOP20Received = CallResult<{
79
79
  }, []>;
80
80
  export interface IMotoChefFactory extends IOP_NETContract {
81
81
  owner(): Promise<Owner>;
82
- initialize(motoTokenAddress: Address): Promise<InitializeFactory>;
82
+ initialize(): Promise<InitializeFactory>;
83
83
  pauseFactory(): Promise<PauseFactory>;
84
84
  unpauseFactory(): Promise<UnpauseFactory>;
85
85
  isPaused(): Promise<IsPaused>;
86
86
  getTokenDeployer(tokenAddress: Address): Promise<GetTokenDeployer>;
87
87
  getTokenOwner(tokenAddress: Address): Promise<GetTokenOwner>;
88
88
  deployToken(maxSupply: bigint, decimals: number, name: string, symbol: string, initialMintTo: Address, initialMintAmount: bigint, freeMintSupply: bigint, freeMintPerTx: bigint, tokenOwner: Address): Promise<DeployToken>;
89
- deployMotoChef(devAddress: Address, tokenPerBlock: bigint, bonusEndBlock: bigint, bonusMultiplier: bigint, BTCAllocPoint: bigint, tokenAddress: Address, tokenAllocPoint: bigint, userBTCFeePercentage: bigint, userFeeRecipient: string, farmName: string, farmBanner: string, additionalPoolTokens: Address[], additionalPoolAllocPoints: bigint[]): Promise<DeployMotoChef>;
89
+ deployMotoChef(tokenPerBlock: bigint, bonusEndBlock: bigint, bonusMultiplier: bigint, BTCAllocPoint: bigint, tokenAddress: Address, tokenAllocPoint: bigint, userBTCFeePercentage: bigint, userFeeRecipient: string, farmName: string, farmBanner: string, additionalPoolTokens: Address[], additionalPoolAllocPoints: bigint[]): Promise<DeployMotoChef>;
90
90
  updateTokenOwner(tokenAddress: Address, newOwner: Address): Promise<UpdateTokenOwner>;
91
91
  getUserTokens(deployer: Address): Promise<GetUserTokens>;
92
92
  getDeploymentInfo(deployer: Address): Promise<GetDeploymentInfo>;