Created
March 5, 2026 11:50
-
-
Save ordishs/6751f3eee75d7878e022693b2afb6b55 to your computer and use it in GitHub Desktop.
P2PKH in Rúnar Go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type P2PKH struct { | |
| runar.SmartContract | |
| PubKeyHash runar.Addr `runar:"readonly"` | |
| } | |
| func (c *P2PKH) Unlock(sig runar.Sig, pubKey runar.PubKey) { | |
| runar.Assert(runar.Hash160(pubKey) == c.PubKeyHash) | |
| runar.Assert(runar.CheckSig(sig, pubKey)) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment