Base wallet implementation (#35)

* Initial draft of the neo-go wallet

* Cleanup + more test for util package

* integrated wallet into neo-cli partially

* base wallet implementation + smartcontract code.
This commit is contained in:
Anthony De Meulemeester 2018-03-02 16:24:09 +01:00 committed by GitHub
parent 942650dd8b
commit f3f6662fc9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
33 changed files with 1754 additions and 87 deletions

14
pkg/util/array.go Normal file
View file

@ -0,0 +1,14 @@
package util
// ArrayReverse return a reversed version of the given byte slice.
func ArrayReverse(b []byte) []byte {
// Protect from big.Ints that have 1 len bytes.
if len(b) < 2 {
return b
}
dest := make([]byte, len(b))
for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
dest[i], dest[j] = b[j], b[i]
}
return dest
}