wallets
This commit is contained in:
9 files changed
+396
-162
No files matched your search
@@ -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
|
||||
}
|
||||
Reference in new issue
Block a user