github.com/annchain/OG@v0.0.9/og_interface/model.go (about)

     1  package og_interface
     2  
     3  import (
     4  	"github.com/libp2p/go-libp2p-core/crypto"
     5  	cryptopb "github.com/libp2p/go-libp2p-core/crypto/pb"
     6  )
     7  
     8  type CryptoType int
     9  
    10  const CryptoTypeRSA = CryptoType(cryptopb.KeyType_RSA)
    11  const CryptoTypeEd25519 = CryptoType(cryptopb.KeyType_Ed25519)
    12  const CryptoTypeSecp256k1 = CryptoType(cryptopb.KeyType_Secp256k1)
    13  const CryptoTypeECDSA = CryptoType(cryptopb.KeyType_ECDSA)
    14  
    15  type BlockContentType int
    16  
    17  const (
    18  	BlockContentTypeInt BlockContentType = iota
    19  )
    20  
    21  // OgLedgerAccount represents a full account of a user.
    22  type OgLedgerAccount struct {
    23  	PublicKey  crypto.PubKey
    24  	PrivateKey crypto.PrivKey
    25  	Address    Address
    26  }
    27  
    28  type BlsConsensusAccount struct {
    29  	id string
    30  }
    31  
    32  func (b BlsConsensusAccount) Id() string {
    33  	return b.id
    34  }
    35  
    36  type OgTx struct {
    37  	Hash        Hash
    38  	ParentsHash []Hash
    39  	MineNonce   uint64
    40  	From        Address
    41  	To          Address
    42  	Value       string // bigint
    43  	TokenId     int32
    44  	PublicKey   []byte
    45  	Data        []byte
    46  	Signature   []byte
    47  }
    48  
    49  type OgSequencer struct {
    50  }