-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR adds the following features: - solidification - multithreading - pluggable VMs
- Loading branch information
Showing
6 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package utxo | ||
|
||
type Input interface { | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package utxo | ||
|
||
type Output interface { | ||
ID() OutputID | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package utxo | ||
|
||
type OutputID [32]byte |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package utxo | ||
|
||
type Transaction interface { | ||
ID() TransactionID | ||
|
||
Inputs() []Input | ||
|
||
Bytes() []byte | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package utxo | ||
|
||
import ( | ||
"github.com/mr-tron/base58" | ||
) | ||
|
||
// TransactionID is the type that represents the identifier of a Transaction. | ||
type TransactionID [32]byte | ||
|
||
// Bytes returns a marshaled version of the TransactionID. | ||
func (t TransactionID) Bytes() (serializedTransaction []byte) { | ||
return t[:] | ||
} | ||
|
||
// String creates a human-readable version of the TransactionID. | ||
func (t TransactionID) String() (humanReadableTransactionID string) { | ||
return "TransactionID(" + base58.Encode(t[:]) + ")" | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package utxo |