SIGBlockchain / project_aurum

SIG Blockchain blockchain project in Go
https://acm.cs.uic.edu/sigblockchain
MIT License
7 stars 0 forks source link

Create a `Serializable` interface #323

Closed kastolars closed 5 years ago

kastolars commented 5 years ago

In an effort to abstract the data types Aurum supports for storage in blocks, a Serializable interface should be made. This interface would support two functions: Serialize and Deserialize.

The Serialize function should return a []byte and an error. The Deserialize function should take a []byte as a parameter and return an error.

As far as organization goes, this can go into a package called interfaces.

Resource on go interfaces: https://gobyexample.com/interfaces