Skip to content

Commit

Permalink
Feat: Realities Ledger Rework
Browse files Browse the repository at this point in the history
This PR adds the following features:

- solidification
- multithreading
- pluggable VMs
  • Loading branch information
hmoog committed Mar 10, 2022
1 parent ab5915f commit 917e0f8
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/utxo/input.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package utxo

type Input interface {
}
5 changes: 5 additions & 0 deletions packages/utxo/output.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package utxo

type Output interface {
ID() OutputID
}
3 changes: 3 additions & 0 deletions packages/utxo/outputid.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package utxo

type OutputID [32]byte
9 changes: 9 additions & 0 deletions packages/utxo/transaction.go
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
}
18 changes: 18 additions & 0 deletions packages/utxo/transactionid.go
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[:]) + ")"
}
1 change: 1 addition & 0 deletions packages/utxo/vm.go
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package utxo

0 comments on commit 917e0f8

Please sign in to comment.