This commit is contained in:
SowinskiBraeden committed 2022-12-12 09:19:55 -08:00
1 parent 9e6d5d4def
commit a77d1d9c74
9 files changed
+396 -162

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
package blockchain
type TxOutput struct {
Value int
PubKey string
}
type TxInput struct {
ID []byte
Out int
Sig string
}
func (in *TxInput) CanUnlock(data string) bool {
return in.Sig == data
}
func (out *TxOutput) CanBeUnlocked(data string) bool {
return out.PubKey == data
}