Skip to content

Conversation

@wregulski
Copy link
Contributor

This pull request introduces new functionalities and improvements to the compat and script packages, including new methods for signing messages and extracting script parts, as well as corresponding tests.

New Functionalities:

  • compat/bsm/sign.go: Added SignMessageString function to sign messages and return the signature as a base64-encoded string.
  • script/script.go: Added GetParts and GetPublicKey methods to the Script type for extracting decoded chunks and public keys from scripts.

Code Improvements:

  • compat/bsm/sign.go: Imported encoding/base64 package to support the new SignMessageString function.
  • script/script.go: Imported github.com/pkg/errors package for improved error handling.

Tests:

  • script/script_test.go: Added tests for GetParts and GetPublicKey methods, covering various scenarios including valid, invalid, and edge cases.

Linked Issues / Tickets

No references to specific tasks (maintenance/feedback).

  • I have added new unit tests
  • All tests pass locally
  • I have tested manually in my local environment

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have updated CHANGELOG.md with my changes
  • I have run npm run doc and npm run lint one final time before requesting a review

@wregulski wregulski added the enhancement New feature or request label Oct 17, 2024
@rohenaz rohenaz changed the base branch from master to feat/api-extension October 18, 2024 13:24
@rohenaz rohenaz merged commit b30eeef into bsv-blockchain:feat/api-extension Oct 18, 2024
2 of 3 checks passed
@rohenaz rohenaz mentioned this pull request Oct 18, 2024
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants