Initial dract of the common structs

This commit is contained in:
a_bennassar
2020-07-24 13:04:17 +02:00
parent ecf731982e
commit b9936f8564
16 changed files with 310 additions and 5 deletions

18
common/account.go Normal file
View File

@@ -0,0 +1,18 @@
package common
import (
"math/big"
eth "github.com/ethereum/go-ethereum/common"
"github.com/iden3/go-iden3-crypto/babyjub"
)
// Account is a struct that gives information of the holdings of an address for a specific token
type Account struct {
EthAddr eth.Address
TokenID TokenID // effective 32 bits
Idx uint32 // bits = SMT levels (SMT levels needs to be decided)
Nonce uint64 // effective 48 bits
Balance *big.Int // Up to 192 bits
Signature babyjub.PublicKey
}