Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

covenant: set methods on covenant. #866

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

nodech
Copy link
Contributor

@nodech nodech commented Oct 19, 2023

Add helper methods on covenant for every type.

Part of #703 and #619

@nodech nodech added intermediate review difficulty - intermediate primitives part of the codebase breaking-minor Backwards compatible - Release version labels Oct 19, 2023
@nodech nodech self-assigned this Oct 19, 2023
@coveralls
Copy link

coveralls commented Oct 19, 2023

Coverage Status

coverage: 68.672% (-0.005%) from 68.677% when pulling 0f4767f on nodech:covenant-methods into 0690c6f on handshake-org:master.

Copy link
Member

@rithvikvibhu rithvikvibhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small comments but LGTM!

lib/primitives/covenant.js Outdated Show resolved Hide resolved
Comment on lines +498 to +499
this.pushU8(address.version);
this.push(address.hash);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would an assert(address instanceof Address) make sense here? pushU8 and push will catch them anyway ig.

@rithvikvibhu
Copy link
Member

Seeing proper type hints is refreshing ❤️

image

@nodech nodech merged commit 7bd2078 into handshake-org:master Oct 20, 2023
6 checks passed
@nodech nodech deleted the covenant-methods branch October 20, 2023 09:02
@nodech nodech added this to the hsd 7.0.0 milestone Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-minor Backwards compatible - Release version intermediate review difficulty - intermediate primitives part of the codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants