types

package
v1.11.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2019 License: MIT Imports: 33 Imported by: 82

Documentation

Index

Constants

View Source
const (
	// DefaultMaxBlockSize is the maximum block size (currently 1MiB)
	DefaultMaxBlockSize = 1 << 20
	DefaultTxVerifyTime = time.Microsecond * 200
	DefaultEvictPeriod  = 12

	// DefaultMaxHdrSize is the max size of the proto-buf serialized non-body
	// fields. For the estimation detail, check 'TestBlockHeaderLimit' in
	// 'blockchain_test.go.' Caution: Be sure to adjust the value below if the
	// structure of the header is changed.
	DefaultMaxHdrSize = 400
)
View Source
const (
	AergoSystem = "aergo.system"
	AergoName   = "aergo.name"

	MaxCandidates = 30

	VoteBP         = "v1voteBP"
	VoteGasPrice   = "v1voteGasPrice"
	VoteNumBP      = "v1voteNumBP"
	VoteNamePrice  = "v1voteNamePrice"
	VoteMinStaking = "v1voteMinStaking"
)
View Source
const AddressLength = 33
View Source
const AddressVersion = 0x42
View Source
const BloomBitBits = BloomBitByte * 8
View Source
const BloomBitByte = 256
View Source
const BloomHashKNum = 3
View Source
const EncodedAddressLength = 52
View Source
const (
	HashIDLength = 32
)
View Source
const MAXBLOCKRANGE = 10000
View Source
const NameCreate = "v1createName"
View Source
const NameLength = 12
View Source
const NameUpdate = "v1updateName"
View Source
const PrivKeyVersion = 0xAA
View Source
const SetContractOwner = "v1setOwner"
View Source
const Stake = "v1stake"
View Source
const TxMaxSize = 200 * 1024
View Source
const Unstake = "v1unstake"

Variables

View Source
var (
	DefaultVerifierCnt          = int(math.Max(float64(runtime.NumCPU()/2), float64(1)))
	DefaultAvgTimeSize          = 60 * 60 * 24
	AvgTxVerifyTime    *AvgTime = NewAvgTime(DefaultAvgTimeSize)
)
View Source
var (
	//ErrTxNotFound is returned by MemPool Service if transaction does not exists
	ErrTxNotFound = errors.New("tx not found in mempool")

	//ErrTxHasInvalidHash is returned by MemPool Service if transaction does have invalid hash
	ErrTxHasInvalidHash = errors.New("tx has invalid hash")

	//ErrTxAlreadyInMempool is returned by MemPool Service if exact same transaction is already exists
	ErrTxAlreadyInMempool = errors.New("tx is already in mempool")

	//ErrSameNonceInMempool is returned by MemPool Service if transaction which has same nonce is already exists
	ErrSameNonceAlreadyInMempool = errors.New("tx with same nonce is already in mempool")

	//ErrTxFormatInvalid is returned by MemPool Service if transaction does not exists ErrTxFormatInvalid = errors.New("tx invalid format")
	ErrTxFormatInvalid = errors.New("tx invalid format")

	//ErrInsufficientBalance is returned by MemPool Service if account has not enough balance
	ErrInsufficientBalance = errors.New("not enough balance")

	//ErrTxNonceTooLow is returned by MemPool Service if transaction's nonce is already existed in block
	ErrTxNonceTooLow = errors.New("nonce is too low")

	//ErrTxNonceToohigh is for internal use only
	ErrTxNonceToohigh = errors.New("nonce is too high")

	ErrTxInvalidType = errors.New("tx invalid type")

	ErrTxInvalidAccount = errors.New("tx invalid account")

	ErrTxInvalidChainIdHash = errors.New("tx invalid chain id hash")

	//ErrInvalidRecipient
	ErrTxInvalidRecipient = errors.New("tx invalid recipient")

	ErrTxInvalidAmount = errors.New("tx invalid amount")

	ErrTxInvalidPrice = errors.New("tx invalid price")

	ErrTxInvalidPayload = errors.New("tx invalid payload")

	ErrTxInvalidSize = errors.New("size of tx exceeds max length")

	ErrSignNotMatch = errors.New("signature not matched")

	ErrCouldNotRecoverPubKey = errors.New("could not recover pubkey from sign")

	ErrShouldUnlockAccount = errors.New("should unlock account first")

	ErrWrongAddressOrPassWord = errors.New("address or password is incorrect")

	//ErrStakeBeforeVote
	ErrMustStakeBeforeVote = errors.New("must stake before vote")

	//ErrLessTimeHasPassed
	ErrLessTimeHasPassed = errors.New("less time has passed")

	//ErrTooSmallAmount
	ErrTooSmallAmount = errors.New("too small amount to influence")

	ErrNameNotFound = errors.New("could not find name")

	//ErrMustStakeBeforeUnstake
	ErrMustStakeBeforeUnstake = errors.New("must stake before unstake")

	//ErrTooSmallAmount
	ErrExceedAmount = errors.New("request amount exceeds")
)
View Source
var AllVotes = [...]string{VoteBP}

var AllVotes = [...]string{VoteBP, VoteGasPrice, VoteNumBP, VoteNamePrice, VoteMinStaking}

View Source
var CommitStatus_name = map[int32]string{
	0: "TX_OK",
	1: "TX_NONCE_TOO_LOW",
	2: "TX_ALREADY_EXISTS",
	3: "TX_INVALID_HASH",
	4: "TX_INVALID_SIGN",
	5: "TX_INVALID_FORMAT",
	6: "TX_INSUFFICIENT_BALANCE",
	7: "TX_HAS_SAME_NONCE",
	9: "TX_INTERNAL_ERROR",
}
View Source
var CommitStatus_value = map[string]int32{
	"TX_OK":                   0,
	"TX_NONCE_TOO_LOW":        1,
	"TX_ALREADY_EXISTS":       2,
	"TX_INVALID_HASH":         3,
	"TX_INVALID_SIGN":         4,
	"TX_INVALID_FORMAT":       5,
	"TX_INSUFFICIENT_BALANCE": 6,
	"TX_HAS_SAME_NONCE":       7,
	"TX_INTERNAL_ERROR":       9,
}
View Source
var MainNetGenesis = "" /* 1892-byte string literal not displayed */
View Source
var MaxAER *big.Int

MaxAER is maximum value of aergo

View Source
var MembershipChangeType_name = map[int32]string{
	0: "ADD_MEMBER",
	1: "REMOVE_MEMBER",
}
View Source
var MembershipChangeType_value = map[string]int32{
	"ADD_MEMBER":    0,
	"REMOVE_MEMBER": 1,
}
View Source
var MetricType_name = map[int32]string{
	0: "NOTHING",
	1: "P2P_NETWORK",
}
View Source
var MetricType_value = map[string]int32{
	"NOTHING":     0,
	"P2P_NETWORK": 1,
}
View Source
var NamePrice *big.Int

/NamePrice is default value of creating and updating name

View Source
var ResultStatus_name = map[int32]string{
	0:  "OK",
	1:  "CANCELED",
	2:  "UNKNOWN",
	3:  "INVALID_ARGUMENT",
	4:  "DEADLINE_EXCEEDED",
	5:  "NOT_FOUND",
	6:  "ALREADY_EXISTS",
	7:  "PERMISSION_DENIED",
	8:  "RESOURCE_EXHAUSTED",
	9:  "FAILED_PRECONDITION",
	10: "ABORTED",
	11: "OUT_OF_RANGE",
	12: "UNIMPLEMENTED",
	13: "INTERNAL",
	14: "UNAVAILABLE",
	15: "DATA_LOSS",
	16: "UNAUTHENTICATED",
}
View Source
var ResultStatus_value = map[string]int32{
	"OK":                  0,
	"CANCELED":            1,
	"UNKNOWN":             2,
	"INVALID_ARGUMENT":    3,
	"DEADLINE_EXCEEDED":   4,
	"NOT_FOUND":           5,
	"ALREADY_EXISTS":      6,
	"PERMISSION_DENIED":   7,
	"RESOURCE_EXHAUSTED":  8,
	"FAILED_PRECONDITION": 9,
	"ABORTED":             10,
	"OUT_OF_RANGE":        11,
	"UNIMPLEMENTED":       12,
	"INTERNAL":            13,
	"UNAVAILABLE":         14,
	"DATA_LOSS":           15,
	"UNAUTHENTICATED":     16,
}
View Source
var StakingMinimum *big.Int

StakingMinimum is minimum amount for staking

View Source
var TestNetGenesis = "" /* 1834-byte string literal not displayed */
View Source
var TxType_name = map[int32]string{
	0: "NORMAL",
	1: "GOVERNANCE",
}
View Source
var TxType_value = map[string]int32{
	"NORMAL":     0,
	"GOVERNANCE": 1,
}
View Source
var VerifyStatus_name = map[int32]string{
	0: "VERIFY_STATUS_OK",
	1: "VERIFY_STATUS_SIGN_NOT_MATCH",
	2: "VERIFY_STATUS_INVALID_HASH",
}
View Source
var VerifyStatus_value = map[string]int32{
	"VERIFY_STATUS_OK":             0,
	"VERIFY_STATUS_SIGN_NOT_MATCH": 1,
	"VERIFY_STATUS_INVALID_HASH":   2,
}

Functions

func AddressOrigin added in v0.9.0

func AddressOrigin(addr []byte) []byte

func AddressPadding added in v0.9.0

func AddressPadding(addr []byte) []byte

func AddressesToStringMap

func AddressesToStringMap(addrs []*PeerAddress) []map[string]string

AddressesToStringMap make map of string for logging or json encoding

func BlockNoToBytes

func BlockNoToBytes(bn BlockNo) []byte

BlockNoToBytes represents to serialize block no to bytes

func CalculateTxsRootHash

func CalculateTxsRootHash(txs []*Tx) []byte

CalculateTxsRootHash generates merkle tree of transactions and returns root hash.

func Clone

func Clone(i interface{}) interface{}

func DecodeB58

func DecodeB58(sb string) []byte

func DecodeB64

func DecodeB64(sb string) []byte

func DecodePrivKey

func DecodePrivKey(encodedKey string) ([]byte, error)

func EncodeAddress

func EncodeAddress(addr Address) string

func EncodeB58

func EncodeB58(bs []byte) string

func EncodeB64

func EncodeB64(bs []byte) string

func EncodePrivKey

func EncodePrivKey(key []byte) string

func GetStakingMinimum added in v0.9.0

func GetStakingMinimum() *big.Int

GetStakingMinimum returns the minimum limit of staking.

func IDB58Encode added in v0.9.0

func IDB58Encode(pid PeerID) string

func RegisterAergoRPCServiceServer

func RegisterAergoRPCServiceServer(s *grpc.Server, srv AergoRPCServiceServer)

func RegisterPolarisRPCServiceServer added in v0.9.0

func RegisterPolarisRPCServiceServer(s *grpc.Server, srv PolarisRPCServiceServer)

func ToAddress

func ToAddress(addr string) []byte

ToAddress return byte array of given base58check encoded address string

func ValidateSystemTx added in v0.9.0

func ValidateSystemTx(tx *TxBody) error

Types

type ABI

type ABI struct {
	Version              string      `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	Language             string      `protobuf:"bytes,2,opt,name=language,proto3" json:"language,omitempty"`
	Functions            []*Function `protobuf:"bytes,3,rep,name=functions,proto3" json:"functions,omitempty"`
	StateVariables       []*StateVar `protobuf:"bytes,4,rep,name=state_variables,json=stateVariables,proto3" json:"state_variables,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (*ABI) Descriptor

func (*ABI) Descriptor() ([]byte, []int)

func (*ABI) GetFunctions

func (m *ABI) GetFunctions() []*Function

func (*ABI) GetLanguage

func (m *ABI) GetLanguage() string

func (*ABI) GetStateVariables added in v0.8.2

func (m *ABI) GetStateVariables() []*StateVar

func (*ABI) GetVersion

func (m *ABI) GetVersion() string

func (*ABI) ProtoMessage

func (*ABI) ProtoMessage()

func (*ABI) Reset

func (m *ABI) Reset()

func (*ABI) String

func (m *ABI) String() string

func (*ABI) XXX_DiscardUnknown

func (m *ABI) XXX_DiscardUnknown()

func (*ABI) XXX_Marshal

func (m *ABI) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ABI) XXX_Merge

func (m *ABI) XXX_Merge(src proto.Message)

func (*ABI) XXX_Size

func (m *ABI) XXX_Size() int

func (*ABI) XXX_Unmarshal

func (m *ABI) XXX_Unmarshal(b []byte) error

type Account

type Account struct {
	Address              []byte   `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func NewAccount

func NewAccount(addr []byte) *Account

NewAccount alloc new account object

func (*Account) Descriptor

func (*Account) Descriptor() ([]byte, []int)

func (*Account) GetAddress

func (m *Account) GetAddress() []byte

func (*Account) ProtoMessage

func (*Account) ProtoMessage()

func (*Account) Reset

func (m *Account) Reset()

func (*Account) String

func (m *Account) String() string

func (*Account) ToString

func (a *Account) ToString() string

ToString return base58check encoded string of address

func (*Account) XXX_DiscardUnknown

func (m *Account) XXX_DiscardUnknown()

func (*Account) XXX_Marshal

func (m *Account) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Account) XXX_Merge

func (m *Account) XXX_Merge(src proto.Message)

func (*Account) XXX_Size

func (m *Account) XXX_Size() int

func (*Account) XXX_Unmarshal

func (m *Account) XXX_Unmarshal(b []byte) error

type AccountAddress added in v0.9.0

type AccountAddress struct {
	Value                []byte   `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*AccountAddress) Descriptor added in v0.9.0

func (*AccountAddress) Descriptor() ([]byte, []int)

func (*AccountAddress) GetValue added in v0.9.0

func (m *AccountAddress) GetValue() []byte

func (*AccountAddress) ProtoMessage added in v0.9.0

func (*AccountAddress) ProtoMessage()

func (*AccountAddress) Reset added in v0.9.0

func (m *AccountAddress) Reset()

func (*AccountAddress) String added in v0.9.0

func (m *AccountAddress) String() string

func (*AccountAddress) XXX_DiscardUnknown added in v0.9.0

func (m *AccountAddress) XXX_DiscardUnknown()

func (*AccountAddress) XXX_Marshal added in v0.9.0

func (m *AccountAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AccountAddress) XXX_Merge added in v0.9.0

func (m *AccountAddress) XXX_Merge(src proto.Message)

func (*AccountAddress) XXX_Size added in v0.9.0

func (m *AccountAddress) XXX_Size() int

func (*AccountAddress) XXX_Unmarshal added in v0.9.0

func (m *AccountAddress) XXX_Unmarshal(b []byte) error

type AccountAndRoot

type AccountAndRoot struct {
	Account              []byte   `protobuf:"bytes,1,opt,name=Account,proto3" json:"Account,omitempty"`
	Root                 []byte   `protobuf:"bytes,2,opt,name=Root,proto3" json:"Root,omitempty"`
	Compressed           bool     `protobuf:"varint,3,opt,name=Compressed,proto3" json:"Compressed,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*AccountAndRoot) Descriptor

func (*AccountAndRoot) Descriptor() ([]byte, []int)

func (*AccountAndRoot) GetAccount

func (m *AccountAndRoot) GetAccount() []byte

func (*AccountAndRoot) GetCompressed added in v0.8.1

func (m *AccountAndRoot) GetCompressed() bool

func (*AccountAndRoot) GetRoot

func (m *AccountAndRoot) GetRoot() []byte

func (*AccountAndRoot) ProtoMessage

func (*AccountAndRoot) ProtoMessage()

func (*AccountAndRoot) Reset

func (m *AccountAndRoot) Reset()

func (*AccountAndRoot) String

func (m *AccountAndRoot) String() string

func (*AccountAndRoot) XXX_DiscardUnknown

func (m *AccountAndRoot) XXX_DiscardUnknown()

func (*AccountAndRoot) XXX_Marshal

func (m *AccountAndRoot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AccountAndRoot) XXX_Merge

func (m *AccountAndRoot) XXX_Merge(src proto.Message)

func (*AccountAndRoot) XXX_Size

func (m *AccountAndRoot) XXX_Size() int

func (*AccountAndRoot) XXX_Unmarshal

func (m *AccountAndRoot) XXX_Unmarshal(b []byte) error

type AccountID

type AccountID HashID

AccountID is a HashID to identify an account

func ToAccountID

func ToAccountID(account []byte) AccountID

ToAccountID make a AccountHash from bytes

func (AccountID) String

func (id AccountID) String() string

type AccountList

type AccountList struct {
	Accounts             []*Account `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

func NewAccountList

func NewAccountList(accounts []*Account) *AccountList

NewAccountList alloc new account list

func (*AccountList) Descriptor

func (*AccountList) Descriptor() ([]byte, []int)

func (*AccountList) GetAccounts

func (m *AccountList) GetAccounts() []*Account

func (*AccountList) ProtoMessage

func (*AccountList) ProtoMessage()

func (*AccountList) Reset

func (m *AccountList) Reset()

func (*AccountList) String

func (m *AccountList) String() string

func (*AccountList) XXX_DiscardUnknown

func (m *AccountList) XXX_DiscardUnknown()

func (*AccountList) XXX_Marshal

func (m *AccountList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AccountList) XXX_Merge

func (m *AccountList) XXX_Merge(src proto.Message)

func (*AccountList) XXX_Size

func (m *AccountList) XXX_Size() int

func (*AccountList) XXX_Unmarshal

func (m *AccountList) XXX_Unmarshal(b []byte) error

type AccountProof added in v0.9.0

type AccountProof struct {
	State                *State   `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"`
	Inclusion            bool     `protobuf:"varint,2,opt,name=inclusion,proto3" json:"inclusion,omitempty"`
	Key                  []byte   `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
	ProofKey             []byte   `protobuf:"bytes,4,opt,name=proofKey,proto3" json:"proofKey,omitempty"`
	ProofVal             []byte   `protobuf:"bytes,5,opt,name=proofVal,proto3" json:"proofVal,omitempty"`
	Bitmap               []byte   `protobuf:"bytes,6,opt,name=bitmap,proto3" json:"bitmap,omitempty"`
	Height               uint32   `protobuf:"varint,7,opt,name=height,proto3" json:"height,omitempty"`
	AuditPath            [][]byte `protobuf:"bytes,8,rep,name=auditPath,proto3" json:"auditPath,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*AccountProof) Descriptor added in v0.9.0

func (*AccountProof) Descriptor() ([]byte, []int)

func (*AccountProof) GetAuditPath added in v0.9.0

func (m *AccountProof) GetAuditPath() [][]byte

func (*AccountProof) GetBitmap added in v0.9.0

func (m *AccountProof) GetBitmap() []byte

func (*AccountProof) GetHeight added in v0.9.0

func (m *AccountProof) GetHeight() uint32

func (*AccountProof) GetInclusion added in v0.9.0

func (m *AccountProof) GetInclusion() bool

func (*AccountProof) GetKey added in v0.9.0

func (m *AccountProof) GetKey() []byte

func (*AccountProof) GetProofKey added in v0.9.0

func (m *AccountProof) GetProofKey() []byte

func (*AccountProof) GetProofVal added in v0.9.0

func (m *AccountProof) GetProofVal() []byte

func (*AccountProof) GetState added in v0.9.0

func (m *AccountProof) GetState() *State

func (*AccountProof) ProtoMessage added in v0.9.0

func (*AccountProof) ProtoMessage()

func (*AccountProof) Reset added in v0.9.0

func (m *AccountProof) Reset()

func (*AccountProof) String added in v0.9.0

func (m *AccountProof) String() string

func (*AccountProof) XXX_DiscardUnknown added in v0.9.0

func (m *AccountProof) XXX_DiscardUnknown()

func (*AccountProof) XXX_Marshal added in v0.9.0

func (m *AccountProof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AccountProof) XXX_Merge added in v0.9.0

func (m *AccountProof) XXX_Merge(src proto.Message)

func (*AccountProof) XXX_Size added in v0.9.0

func (m *AccountProof) XXX_Size() int

func (*AccountProof) XXX_Unmarshal added in v0.9.0

func (m *AccountProof) XXX_Unmarshal(b []byte) error

type AccountVoteInfo added in v0.9.0

type AccountVoteInfo struct {
	Staking              *Staking    `protobuf:"bytes,1,opt,name=staking,proto3" json:"staking,omitempty"`
	Voting               []*VoteInfo `protobuf:"bytes,2,rep,name=voting,proto3" json:"voting,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (*AccountVoteInfo) Descriptor added in v0.9.0

func (*AccountVoteInfo) Descriptor() ([]byte, []int)

func (*AccountVoteInfo) GetStaking added in v0.9.0

func (m *AccountVoteInfo) GetStaking() *Staking

func (*AccountVoteInfo) GetVoting added in v0.9.0

func (m *AccountVoteInfo) GetVoting() []*VoteInfo

func (*AccountVoteInfo) ProtoMessage added in v0.9.0

func (*AccountVoteInfo) ProtoMessage()

func (*AccountVoteInfo) Reset added in v0.9.0

func (m *AccountVoteInfo) Reset()

func (*AccountVoteInfo) String added in v0.9.0

func (m *AccountVoteInfo) String() string

func (*AccountVoteInfo) XXX_DiscardUnknown added in v0.9.0

func (m *AccountVoteInfo) XXX_DiscardUnknown()

func (*AccountVoteInfo) XXX_Marshal added in v0.9.0

func (m *AccountVoteInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AccountVoteInfo) XXX_Merge added in v0.9.0

func (m *AccountVoteInfo) XXX_Merge(src proto.Message)

func (*AccountVoteInfo) XXX_Size added in v0.9.0

func (m *AccountVoteInfo) XXX_Size() int

func (*AccountVoteInfo) XXX_Unmarshal added in v0.9.0

func (m *AccountVoteInfo) XXX_Unmarshal(b []byte) error

type Address

type Address = []byte

func DecodeAddress

func DecodeAddress(encodedAddr string) (Address, error)

type AddressesRequest

type AddressesRequest struct {
	Sender               *PeerAddress `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	MaxSize              uint32       `protobuf:"varint,2,opt,name=maxSize,proto3" json:"maxSize,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*AddressesRequest) Descriptor

func (*AddressesRequest) Descriptor() ([]byte, []int)

func (*AddressesRequest) GetMaxSize

func (m *AddressesRequest) GetMaxSize() uint32

func (*AddressesRequest) GetSender

func (m *AddressesRequest) GetSender() *PeerAddress

func (*AddressesRequest) ProtoMessage

func (*AddressesRequest) ProtoMessage()

func (*AddressesRequest) Reset

func (m *AddressesRequest) Reset()

func (*AddressesRequest) String

func (m *AddressesRequest) String() string

func (*AddressesRequest) XXX_DiscardUnknown

func (m *AddressesRequest) XXX_DiscardUnknown()

func (*AddressesRequest) XXX_Marshal

func (m *AddressesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AddressesRequest) XXX_Merge

func (m *AddressesRequest) XXX_Merge(src proto.Message)

func (*AddressesRequest) XXX_Size

func (m *AddressesRequest) XXX_Size() int

func (*AddressesRequest) XXX_Unmarshal

func (m *AddressesRequest) XXX_Unmarshal(b []byte) error

type AddressesResponse

type AddressesResponse struct {
	Status               ResultStatus   `protobuf:"varint,1,opt,name=status,proto3,enum=types.ResultStatus" json:"status,omitempty"`
	Peers                []*PeerAddress `protobuf:"bytes,2,rep,name=peers,proto3" json:"peers,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

func (*AddressesResponse) Descriptor

func (*AddressesResponse) Descriptor() ([]byte, []int)

func (*AddressesResponse) GetPeers

func (m *AddressesResponse) GetPeers() []*PeerAddress

func (*AddressesResponse) GetStatus

func (m *AddressesResponse) GetStatus() ResultStatus

func (*AddressesResponse) ProtoMessage

func (*AddressesResponse) ProtoMessage()

func (*AddressesResponse) Reset

func (m *AddressesResponse) Reset()

func (*AddressesResponse) String

func (m *AddressesResponse) String() string

func (*AddressesResponse) XXX_DiscardUnknown

func (m *AddressesResponse) XXX_DiscardUnknown()

func (*AddressesResponse) XXX_Marshal

func (m *AddressesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AddressesResponse) XXX_Merge

func (m *AddressesResponse) XXX_Merge(src proto.Message)

func (*AddressesResponse) XXX_Size

func (m *AddressesResponse) XXX_Size() int

func (*AddressesResponse) XXX_Unmarshal

func (m *AddressesResponse) XXX_Unmarshal(b []byte) error

type AergoRPCServiceClient

type AergoRPCServiceClient interface {
	// Returns the current state of this node
	NodeState(ctx context.Context, in *NodeReq, opts ...grpc.CallOption) (*SingleBytes, error)
	// Returns node metrics according to request
	Metric(ctx context.Context, in *MetricsRequest, opts ...grpc.CallOption) (*Metrics, error)
	// Returns current blockchain status (best block's height and hash)
	Blockchain(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*BlockchainStatus, error)
	// Returns current blockchain's basic information
	GetChainInfo(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ChainInfo, error)
	// Returns current chain statistics
	ChainStat(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ChainStats, error)
	// Returns list of Blocks without body according to request
	ListBlockHeaders(ctx context.Context, in *ListParams, opts ...grpc.CallOption) (*BlockHeaderList, error)
	// Returns list of block metadata (hash, header, and number of transactions) according to request
	ListBlockMetadata(ctx context.Context, in *ListParams, opts ...grpc.CallOption) (*BlockMetadataList, error)
	// Returns a stream of new blocks as they get added to the blockchain
	ListBlockStream(ctx context.Context, in *Empty, opts ...grpc.CallOption) (AergoRPCService_ListBlockStreamClient, error)
	// Returns a stream of new block's metadata as they get added to the blockchain
	ListBlockMetadataStream(ctx context.Context, in *Empty, opts ...grpc.CallOption) (AergoRPCService_ListBlockMetadataStreamClient, error)
	// Return a single block incl. header and body, queried by hash or number
	GetBlock(ctx context.Context, in *SingleBytes, opts ...grpc.CallOption) (*Block, error)
	// Return a single block's metdata (hash, header, and number of transactions), queried by hash or number
	GetBlockMetadata(ctx context.Context, in *SingleBytes, opts ...grpc.CallOption) (*BlockMetadata, error)
	// Return a single block's body, queried by hash or number and list parameters
	GetBlockBody(ctx context.Context, in *BlockBodyParams, opts ...grpc.CallOption) (*BlockBodyPaged, error)
	// Return a single transaction, queried by transaction hash
	GetTX(ctx context.Context, in *SingleBytes, opts ...grpc.CallOption) (*Tx, error)
	// Return information about transaction in block, queried by transaction hash
	GetBlockTX(ctx context.Context, in *SingleBytes, opts ...grpc.CallOption) (*TxInBlock, error)
	// Return transaction receipt, queried by transaction hash
	GetReceipt(ctx context.Context, in *SingleBytes, opts ...grpc.CallOption) (*Receipt, error)
	// Return ABI stored at contract address
	GetABI(ctx context.Context, in *SingleBytes, opts ...grpc.CallOption) (*ABI, error)
	// Sign and send a transaction from an unlocked account
	SendTX(ctx context.Context, in *Tx, opts ...grpc.CallOption) (*CommitResult, error)
	// Sign transaction with unlocked account
	SignTX(ctx context.Context, in *Tx, opts ...grpc.CallOption) (*Tx, error)
	// Verify validity of transaction
	VerifyTX(ctx context.Context, in *Tx, opts ...grpc.CallOption) (*VerifyResult, error)
	// Commit a signed transaction
	CommitTX(ctx context.Context, in *TxList, opts ...grpc.CallOption) (*CommitResultList, error)
	// Return state of account
	GetState(ctx context.Context, in *SingleBytes, opts ...grpc.CallOption) (*State, error)
	// Return state of account, including merkle proof
	GetStateAndProof(ctx context.Context, in *AccountAndRoot, opts ...grpc.CallOption) (*AccountProof, error)
	// Create a new account in this node
	CreateAccount(ctx context.Context, in *Personal, opts ...grpc.CallOption) (*Account, error)
	// Return list of accounts in this node
	GetAccounts(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*AccountList, error)
	// Lock account in this node
	LockAccount(ctx context.Context, in *Personal, opts ...grpc.CallOption) (*Account, error)
	// Unlock account in this node
	UnlockAccount(ctx context.Context, in *Personal, opts ...grpc.CallOption) (*Account, error)
	// Import account to this node
	ImportAccount(ctx context.Context, in *ImportFormat, opts ...grpc.CallOption) (*Account, error)
	// Export account stored in this node
	ExportAccount(ctx context.Context, in *Personal, opts ...grpc.CallOption) (*SingleBytes, error)
	// Query a contract method
	QueryContract(ctx context.Context, in *Query, opts ...grpc.CallOption) (*SingleBytes, error)
	// Query contract state
	QueryContractState(ctx context.Context, in *StateQuery, opts ...grpc.CallOption) (*StateQueryProof, error)
	// Return list of peers of this node and their state
	GetPeers(ctx context.Context, in *PeersParams, opts ...grpc.CallOption) (*PeerList, error)
	// Return result of vote
	GetVotes(ctx context.Context, in *VoteParams, opts ...grpc.CallOption) (*VoteList, error)
	// Return staking, voting info for account
	GetAccountVotes(ctx context.Context, in *AccountAddress, opts ...grpc.CallOption) (*AccountVoteInfo, error)
	// Return staking information
	GetStaking(ctx context.Context, in *AccountAddress, opts ...grpc.CallOption) (*Staking, error)
	// Return name information
	GetNameInfo(ctx context.Context, in *Name, opts ...grpc.CallOption) (*NameInfo, error)
	// Returns a stream of event as they get added to the blockchain
	ListEventStream(ctx context.Context, in *FilterInfo, opts ...grpc.CallOption) (AergoRPCService_ListEventStreamClient, error)
	// Returns list of event
	ListEvents(ctx context.Context, in *FilterInfo, opts ...grpc.CallOption) (*EventList, error)
	// Returns configs and statuses of server
	GetServerInfo(ctx context.Context, in *KeyParams, opts ...grpc.CallOption) (*ServerInfo, error)
	// Returns status of consensus and bps
	GetConsensusInfo(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ConsensusInfo, error)
	// Add & remove member of raft cluster
	ChangeMembership(ctx context.Context, in *MembershipChange, opts ...grpc.CallOption) (*MembershipChangeReply, error)
}

AergoRPCServiceClient is the client API for AergoRPCService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewAergoRPCServiceClient

func NewAergoRPCServiceClient(cc *grpc.ClientConn) AergoRPCServiceClient

type AergoRPCServiceServer

type AergoRPCServiceServer interface {
	// Returns the current state of this node
	NodeState(context.Context, *NodeReq) (*SingleBytes, error)
	// Returns node metrics according to request
	Metric(context.Context, *MetricsRequest) (*Metrics, error)
	// Returns current blockchain status (best block's height and hash)
	Blockchain(context.Context, *Empty) (*BlockchainStatus, error)
	// Returns current blockchain's basic information
	GetChainInfo(context.Context, *Empty) (*ChainInfo, error)
	// Returns current chain statistics
	ChainStat(context.Context, *Empty) (*ChainStats, error)
	// Returns list of Blocks without body according to request
	ListBlockHeaders(context.Context, *ListParams) (*BlockHeaderList, error)
	// Returns list of block metadata (hash, header, and number of transactions) according to request
	ListBlockMetadata(context.Context, *ListParams) (*BlockMetadataList, error)
	// Returns a stream of new blocks as they get added to the blockchain
	ListBlockStream(*Empty, AergoRPCService_ListBlockStreamServer) error
	// Returns a stream of new block's metadata as they get added to the blockchain
	ListBlockMetadataStream(*Empty, AergoRPCService_ListBlockMetadataStreamServer) error
	// Return a single block incl. header and body, queried by hash or number
	GetBlock(context.Context, *SingleBytes) (*Block, error)
	// Return a single block's metdata (hash, header, and number of transactions), queried by hash or number
	GetBlockMetadata(context.Context, *SingleBytes) (*BlockMetadata, error)
	// Return a single block's body, queried by hash or number and list parameters
	GetBlockBody(context.Context, *BlockBodyParams) (*BlockBodyPaged, error)
	// Return a single transaction, queried by transaction hash
	GetTX(context.Context, *SingleBytes) (*Tx, error)
	// Return information about transaction in block, queried by transaction hash
	GetBlockTX(context.Context, *SingleBytes) (*TxInBlock, error)
	// Return transaction receipt, queried by transaction hash
	GetReceipt(context.Context, *SingleBytes) (*Receipt, error)
	// Return ABI stored at contract address
	GetABI(context.Context, *SingleBytes) (*ABI, error)
	// Sign and send a transaction from an unlocked account
	SendTX(context.Context, *Tx) (*CommitResult, error)
	// Sign transaction with unlocked account
	SignTX(context.Context, *Tx) (*Tx, error)
	// Verify validity of transaction
	VerifyTX(context.Context, *Tx) (*VerifyResult, error)
	// Commit a signed transaction
	CommitTX(context.Context, *TxList) (*CommitResultList, error)
	// Return state of account
	GetState(context.Context, *SingleBytes) (*State, error)
	// Return state of account, including merkle proof
	GetStateAndProof(context.Context, *AccountAndRoot) (*AccountProof, error)
	// Create a new account in this node
	CreateAccount(context.Context, *Personal) (*Account, error)
	// Return list of accounts in this node
	GetAccounts(context.Context, *Empty) (*AccountList, error)
	// Lock account in this node
	LockAccount(context.Context, *Personal) (*Account, error)
	// Unlock account in this node
	UnlockAccount(context.Context, *Personal) (*Account, error)
	// Import account to this node
	ImportAccount(context.Context, *ImportFormat) (*Account, error)
	// Export account stored in this node
	ExportAccount(context.Context, *Personal) (*SingleBytes, error)
	// Query a contract method
	QueryContract(context.Context, *Query) (*SingleBytes, error)
	// Query contract state
	QueryContractState(context.Context, *StateQuery) (*StateQueryProof, error)
	// Return list of peers of this node and their state
	GetPeers(context.Context, *PeersParams) (*PeerList, error)
	// Return result of vote
	GetVotes(context.Context, *VoteParams) (*VoteList, error)
	// Return staking, voting info for account
	GetAccountVotes(context.Context, *AccountAddress) (*AccountVoteInfo, error)
	// Return staking information
	GetStaking(context.Context, *AccountAddress) (*Staking, error)
	// Return name information
	GetNameInfo(context.Context, *Name) (*NameInfo, error)
	// Returns a stream of event as they get added to the blockchain
	ListEventStream(*FilterInfo, AergoRPCService_ListEventStreamServer) error
	// Returns list of event
	ListEvents(context.Context, *FilterInfo) (*EventList, error)
	// Returns configs and statuses of server
	GetServerInfo(context.Context, *KeyParams) (*ServerInfo, error)
	// Returns status of consensus and bps
	GetConsensusInfo(context.Context, *Empty) (*ConsensusInfo, error)
	// Add & remove member of raft cluster
	ChangeMembership(context.Context, *MembershipChange) (*MembershipChangeReply, error)
}

AergoRPCServiceServer is the server API for AergoRPCService service.

type AergoRPCService_ListBlockMetadataStreamClient added in v0.9.0

type AergoRPCService_ListBlockMetadataStreamClient interface {
	Recv() (*BlockMetadata, error)
	grpc.ClientStream
}

type AergoRPCService_ListBlockMetadataStreamServer added in v0.9.0

type AergoRPCService_ListBlockMetadataStreamServer interface {
	Send(*BlockMetadata) error
	grpc.ServerStream
}

type AergoRPCService_ListBlockStreamClient

type AergoRPCService_ListBlockStreamClient interface {
	Recv() (*Block, error)
	grpc.ClientStream
}

type AergoRPCService_ListBlockStreamServer

type AergoRPCService_ListBlockStreamServer interface {
	Send(*Block) error
	grpc.ServerStream
}

type AergoRPCService_ListEventStreamClient added in v0.9.0

type AergoRPCService_ListEventStreamClient interface {
	Recv() (*Event, error)
	grpc.ClientStream
}

type AergoRPCService_ListEventStreamServer added in v0.9.0

type AergoRPCService_ListEventStreamServer interface {
	Send(*Event) error
	grpc.ServerStream
}

type ArgFilter added in v0.9.0

type ArgFilter struct {
	// contains filtered or unexported fields
}

type AvgTime added in v0.9.0

type AvgTime struct {
	// contains filtered or unexported fields
}

func NewAvgTime added in v0.9.0

func NewAvgTime(sizeMavg int) *AvgTime

func (*AvgTime) Get added in v0.9.0

func (avgTime *AvgTime) Get() time.Duration

func (*AvgTime) UpdateAverage added in v0.9.0

func (avgTime *AvgTime) UpdateAverage(cur time.Duration) time.Duration

type Block

type Block struct {
	Hash                 []byte       `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	Header               *BlockHeader `protobuf:"bytes,2,opt,name=header,proto3" json:"header,omitempty"`
	Body                 *BlockBody   `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func NewBlock

func NewBlock(prevBlock *Block, blockRoot []byte, receipts *Receipts, txs []*Tx, coinbaseAcc []byte, ts int64) *Block

NewBlock represents to create a block to store transactions.

func (*Block) BPID

func (block *Block) BPID() (id PeerID, err error)

BPID returns its Block Producer's ID from block.

func (*Block) BPID2Str

func (block *Block) BPID2Str() string

BpID2Str returns its Block Producer's ID in base64 format.

func (*Block) BlockHash

func (block *Block) BlockHash() []byte

BlockHash returns block hash. It returns a calculated value if the hash is nil.

func (*Block) BlockID

func (block *Block) BlockID() BlockID

BlockID converts block hash ([]byte) to BlockID.

func (*Block) BlockNo

func (block *Block) BlockNo() BlockNo

BlockNo returns the block number of block.

func (*Block) Confirms

func (block *Block) Confirms() BlockNo

Confirms returns block.Header.Confirms which indicates how many block is confirmed by block.

func (*Block) Descriptor

func (*Block) Descriptor() ([]byte, []int)

func (*Block) GetBody

func (m *Block) GetBody() *BlockBody

func (*Block) GetHash

func (m *Block) GetHash() []byte

func (*Block) GetHeader

func (m *Block) GetHeader() *BlockHeader

func (*Block) GetMetadata added in v0.9.0

func (block *Block) GetMetadata() *BlockMetadata

GetMetadata generates Metadata object for block

func (*Block) ID

func (block *Block) ID() string

ID returns the base64 encoded formated ID (hash) of block.

func (*Block) Localtime added in v0.9.0

func (block *Block) Localtime() time.Time

Localtime retrurns a time.Time object, which is coverted from block timestamp.

func (*Block) PrevBlockID

func (block *Block) PrevBlockID() BlockID

PrevBlockID converts parent block hash ([]byte) to BlockID.

func (*Block) PrevID

func (block *Block) PrevID() string

PrevID returns the base64 encoded formated ID (hash) of the parent block.

func (*Block) ProtoMessage

func (*Block) ProtoMessage()

func (*Block) Reset

func (m *Block) Reset()

func (*Block) SetBlocksRootHash

func (block *Block) SetBlocksRootHash(blockRootHash []byte)

func (*Block) SetChainID added in v0.9.0

func (block *Block) SetChainID(id []byte)

SetChainID sets id to block.ChainID

func (*Block) SetConfirms

func (block *Block) SetConfirms(confirms BlockNo)

SetConfirms sets block.Header.Confirms to confirms.

func (*Block) Sign

func (block *Block) Sign(privKey crypto.PrivKey) error

Sign adds a pubkey and a block signature to block.

func (*Block) Size added in v0.9.0

func (block *Block) Size() int

Size returns a block size where the tx size is individually calculated. A similar method is used to limit the block size by the block factory.

THE REASON WHY THE BLOCK FACTORY DOESN'T USE THE EXACT SIZE OF A MARSHALED BLOCK: The actual size of a marshaled block is larger than this because it includes an additional data associated with the marshaling of the transations array in the block body. It is ineffective that the (DPoS) block factory measures the exact size of the additional probuf data when it produces a block. Thus we use the slightly(?) different and less expensive estimation of the block size.

func (*Block) String

func (m *Block) String() string

func (*Block) ValidChildOf added in v0.9.0

func (block *Block) ValidChildOf(parent *Block) bool

ValidChildOf reports whether block is a varid child of parent.

func (*Block) VerifySign

func (block *Block) VerifySign() (valid bool, err error)

VerifySign verifies the signature of block.

func (*Block) XXX_DiscardUnknown

func (m *Block) XXX_DiscardUnknown()

func (*Block) XXX_Marshal

func (m *Block) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Block) XXX_Merge

func (m *Block) XXX_Merge(src proto.Message)

func (*Block) XXX_Size

func (m *Block) XXX_Size() int

func (*Block) XXX_Unmarshal

func (m *Block) XXX_Unmarshal(b []byte) error

type BlockBody

type BlockBody struct {
	Txs                  []*Tx    `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*BlockBody) Descriptor

func (*BlockBody) Descriptor() ([]byte, []int)

func (*BlockBody) GetTxs

func (m *BlockBody) GetTxs() []*Tx

func (*BlockBody) ProtoMessage

func (*BlockBody) ProtoMessage()

func (*BlockBody) Reset

func (m *BlockBody) Reset()

func (*BlockBody) String

func (m *BlockBody) String() string

func (*BlockBody) XXX_DiscardUnknown

func (m *BlockBody) XXX_DiscardUnknown()

func (*BlockBody) XXX_Marshal

func (m *BlockBody) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BlockBody) XXX_Merge

func (m *BlockBody) XXX_Merge(src proto.Message)

func (*BlockBody) XXX_Size

func (m *BlockBody) XXX_Size() int

func (*BlockBody) XXX_Unmarshal

func (m *BlockBody) XXX_Unmarshal(b []byte) error

type BlockBodyPaged added in v0.9.0

type BlockBodyPaged struct {
	Total                uint32     `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
	Offset               uint32     `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
	Size                 uint32     `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
	Body                 *BlockBody `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

func (*BlockBodyPaged) Descriptor added in v0.9.0

func (*BlockBodyPaged) Descriptor() ([]byte, []int)

func (*BlockBodyPaged) GetBody added in v0.9.0

func (m *BlockBodyPaged) GetBody() *BlockBody

func (*BlockBodyPaged) GetOffset added in v0.9.0

func (m *BlockBodyPaged) GetOffset() uint32

func (*BlockBodyPaged) GetSize added in v0.9.0

func (m *BlockBodyPaged) GetSize() uint32

func (*BlockBodyPaged) GetTotal added in v0.9.0

func (m *BlockBodyPaged) GetTotal() uint32

func (*BlockBodyPaged) ProtoMessage added in v0.9.0

func (*BlockBodyPaged) ProtoMessage()

func (*BlockBodyPaged) Reset added in v0.9.0

func (m *BlockBodyPaged) Reset()

func (*BlockBodyPaged) String added in v0.9.0

func (m *BlockBodyPaged) String() string

func (*BlockBodyPaged) XXX_DiscardUnknown added in v0.9.0

func (m *BlockBodyPaged) XXX_DiscardUnknown()

func (*BlockBodyPaged) XXX_Marshal added in v0.9.0

func (m *BlockBodyPaged) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BlockBodyPaged) XXX_Merge added in v0.9.0

func (m *BlockBodyPaged) XXX_Merge(src proto.Message)

func (*BlockBodyPaged) XXX_Size added in v0.9.0

func (m *BlockBodyPaged) XXX_Size() int

func (*BlockBodyPaged) XXX_Unmarshal added in v0.9.0

func (m *BlockBodyPaged) XXX_Unmarshal(b []byte) error

type BlockBodyParams added in v0.9.0

type BlockBodyParams struct {
	Hashornumber         []byte      `protobuf:"bytes,1,opt,name=hashornumber,proto3" json:"hashornumber,omitempty"`
	Paging               *PageParams `protobuf:"bytes,2,opt,name=paging,proto3" json:"paging,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (*BlockBodyParams) Descriptor added in v0.9.0

func (*BlockBodyParams) Descriptor() ([]byte, []int)

func (*BlockBodyParams) GetHashornumber added in v0.9.0

func (m *BlockBodyParams) GetHashornumber() []byte

func (*BlockBodyParams) GetPaging added in v0.9.0

func (m *BlockBodyParams) GetPaging() *PageParams

func (*BlockBodyParams) ProtoMessage added in v0.9.0

func (*BlockBodyParams) ProtoMessage()

func (*BlockBodyParams) Reset added in v0.9.0

func (m *BlockBodyParams) Reset()

func (*BlockBodyParams) String added in v0.9.0

func (m *BlockBodyParams) String() string

func (*BlockBodyParams) XXX_DiscardUnknown added in v0.9.0

func (m *BlockBodyParams) XXX_DiscardUnknown()

func (*BlockBodyParams) XXX_Marshal added in v0.9.0

func (m *BlockBodyParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BlockBodyParams) XXX_Merge added in v0.9.0

func (m *BlockBodyParams) XXX_Merge(src proto.Message)

func (*BlockBodyParams) XXX_Size added in v0.9.0

func (m *BlockBodyParams) XXX_Size() int

func (*BlockBodyParams) XXX_Unmarshal added in v0.9.0

func (m *BlockBodyParams) XXX_Unmarshal(b []byte) error

type BlockHeader

type BlockHeader struct {
	ChainID              []byte   `protobuf:"bytes,1,opt,name=chainID,proto3" json:"chainID,omitempty"`
	PrevBlockHash        []byte   `protobuf:"bytes,2,opt,name=prevBlockHash,proto3" json:"prevBlockHash,omitempty"`
	BlockNo              uint64   `protobuf:"varint,3,opt,name=blockNo,proto3" json:"blockNo,omitempty"`
	Timestamp            int64    `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	BlocksRootHash       []byte   `protobuf:"bytes,5,opt,name=blocksRootHash,proto3" json:"blocksRootHash,omitempty"`
	TxsRootHash          []byte   `protobuf:"bytes,6,opt,name=txsRootHash,proto3" json:"txsRootHash,omitempty"`
	ReceiptsRootHash     []byte   `protobuf:"bytes,7,opt,name=receiptsRootHash,proto3" json:"receiptsRootHash,omitempty"`
	Confirms             uint64   `protobuf:"varint,8,opt,name=confirms,proto3" json:"confirms,omitempty"`
	PubKey               []byte   `protobuf:"bytes,9,opt,name=pubKey,proto3" json:"pubKey,omitempty"`
	CoinbaseAccount      []byte   `protobuf:"bytes,10,opt,name=coinbaseAccount,proto3" json:"coinbaseAccount,omitempty"`
	Sign                 []byte   `protobuf:"bytes,11,opt,name=sign,proto3" json:"sign,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*BlockHeader) Descriptor

func (*BlockHeader) Descriptor() ([]byte, []int)

func (*BlockHeader) GetBlockNo

func (m *BlockHeader) GetBlockNo() uint64

func (*BlockHeader) GetBlocksRootHash

func (m *BlockHeader) GetBlocksRootHash() []byte

func (*BlockHeader) GetChainID added in v0.8.2

func (m *BlockHeader) GetChainID() []byte

func (*BlockHeader) GetCoinbaseAccount

func (m *BlockHeader) GetCoinbaseAccount() []byte

func (*BlockHeader) GetConfirms

func (m *BlockHeader) GetConfirms() uint64

func (*BlockHeader) GetPrevBlockHash

func (m *BlockHeader) GetPrevBlockHash() []byte

func (*BlockHeader) GetPubKey

func (m *BlockHeader) GetPubKey() []byte

func (*BlockHeader) GetReceiptsRootHash

func (m *BlockHeader) GetReceiptsRootHash() []byte

func (*BlockHeader) GetSign

func (m *BlockHeader) GetSign() []byte

func (*BlockHeader) GetTimestamp

func (m *BlockHeader) GetTimestamp() int64

func (*BlockHeader) GetTxsRootHash

func (m *BlockHeader) GetTxsRootHash() []byte

func (*BlockHeader) ProtoMessage

func (*BlockHeader) ProtoMessage()

func (*BlockHeader) Reset

func (m *BlockHeader) Reset()

func (*BlockHeader) String

func (m *BlockHeader) String() string

func (*BlockHeader) XXX_DiscardUnknown

func (m *BlockHeader) XXX_DiscardUnknown()

func (*BlockHeader) XXX_Marshal

func (m *BlockHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BlockHeader) XXX_Merge

func (m *BlockHeader) XXX_Merge(src proto.Message)

func (*BlockHeader) XXX_Size

func (m *BlockHeader) XXX_Size() int

func (*BlockHeader) XXX_Unmarshal

func (m *BlockHeader) XXX_Unmarshal(b []byte) error

type BlockHeaderList

type BlockHeaderList struct {
	Blocks               []*Block `protobuf:"bytes,1,rep,name=blocks,proto3" json:"blocks,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*BlockHeaderList) Descriptor

func (*BlockHeaderList) Descriptor() ([]byte, []int)

func (*BlockHeaderList) GetBlocks

func (m *BlockHeaderList) GetBlocks() []*Block

func (*BlockHeaderList) ProtoMessage

func (*BlockHeaderList) ProtoMessage()

func (*BlockHeaderList) Reset

func (m *BlockHeaderList) Reset()

func (*BlockHeaderList) String

func (m *BlockHeaderList) String() string

func (*BlockHeaderList) XXX_DiscardUnknown

func (m *BlockHeaderList) XXX_DiscardUnknown()

func (*BlockHeaderList) XXX_Marshal

func (m *BlockHeaderList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BlockHeaderList) XXX_Merge

func (m *BlockHeaderList) XXX_Merge(src proto.Message)

func (*BlockHeaderList) XXX_Size

func (m *BlockHeaderList) XXX_Size() int

func (*BlockHeaderList) XXX_Unmarshal

func (m *BlockHeaderList) XXX_Unmarshal(b []byte) error

type BlockID

type BlockID HashID

BlockID is a HashID to identify a block

func MustParseBlockID added in v0.9.0

func MustParseBlockID(blockHash []byte) BlockID

MustParseBlockID parse, it panics if parsing is failed.

func ParseToBlockID added in v0.9.0

func ParseToBlockID(blockHash []byte) (BlockID, error)

ParseToTxID parse BlockID from bytes. it return error if length of parameter is not fit.

func ToBlockID

func ToBlockID(blockHash []byte) BlockID

ToBlockID make a BlockID from bytes

func (BlockID) String

func (id BlockID) String() string

type BlockInfo added in v0.8.1

type BlockInfo struct {
	Hash []byte
	No   BlockNo
}

NodeInfo is used for actor message to send block info

func (*BlockInfo) Equal added in v0.8.1

func (bi *BlockInfo) Equal(target *BlockInfo) bool

type BlockMetadata added in v0.9.0

type BlockMetadata struct {
	Hash                 []byte       `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	Header               *BlockHeader `protobuf:"bytes,2,opt,name=header,proto3" json:"header,omitempty"`
	Txcount              int32        `protobuf:"varint,3,opt,name=txcount,proto3" json:"txcount,omitempty"`
	Size                 int64        `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*BlockMetadata) Descriptor added in v0.9.0

func (*BlockMetadata) Descriptor() ([]byte, []int)

func (*BlockMetadata) GetHash added in v0.9.0

func (m *BlockMetadata) GetHash() []byte

func (*BlockMetadata) GetHeader added in v0.9.0

func (m *BlockMetadata) GetHeader() *BlockHeader

func (*BlockMetadata) GetSize added in v0.9.0

func (m *BlockMetadata) GetSize() int64

func (*BlockMetadata) GetTxcount added in v0.9.0

func (m *BlockMetadata) GetTxcount() int32

func (*BlockMetadata) ProtoMessage added in v0.9.0

func (*BlockMetadata) ProtoMessage()

func (*BlockMetadata) Reset added in v0.9.0

func (m *BlockMetadata) Reset()

func (*BlockMetadata) String added in v0.9.0

func (m *BlockMetadata) String() string

func (*BlockMetadata) XXX_DiscardUnknown added in v0.9.0

func (m *BlockMetadata) XXX_DiscardUnknown()

func (*BlockMetadata) XXX_Marshal added in v0.9.0

func (m *BlockMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BlockMetadata) XXX_Merge added in v0.9.0

func (m *BlockMetadata) XXX_Merge(src proto.Message)

func (*BlockMetadata) XXX_Size added in v0.9.0

func (m *BlockMetadata) XXX_Size() int

func (*BlockMetadata) XXX_Unmarshal added in v0.9.0

func (m *BlockMetadata) XXX_Unmarshal(b []byte) error

type BlockMetadataList added in v0.9.0

type BlockMetadataList struct {
	Blocks               []*BlockMetadata `protobuf:"bytes,1,rep,name=blocks,proto3" json:"blocks,omitempty"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

func (*BlockMetadataList) Descriptor added in v0.9.0

func (*BlockMetadataList) Descriptor() ([]byte, []int)

func (*BlockMetadataList) GetBlocks added in v0.9.0

func (m *BlockMetadataList) GetBlocks() []*BlockMetadata

func (*BlockMetadataList) ProtoMessage added in v0.9.0

func (*BlockMetadataList) ProtoMessage()

func (*BlockMetadataList) Reset added in v0.9.0

func (m *BlockMetadataList) Reset()

func (*BlockMetadataList) String added in v0.9.0

func (m *BlockMetadataList) String() string

func (*BlockMetadataList) XXX_DiscardUnknown added in v0.9.0

func (m *BlockMetadataList) XXX_DiscardUnknown()

func (*BlockMetadataList) XXX_Marshal added in v0.9.0

func (m *BlockMetadataList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BlockMetadataList) XXX_Merge added in v0.9.0

func (m *BlockMetadataList) XXX_Merge(src proto.Message)

func (*BlockMetadataList) XXX_Size added in v0.9.0

func (m *BlockMetadataList) XXX_Size() int

func (*BlockMetadataList) XXX_Unmarshal added in v0.9.0

func (m *BlockMetadataList) XXX_Unmarshal(b []byte) error

type BlockNo

type BlockNo = uint64

BlockNo is the height of a block, which starts from 0 (genesis block).

const MAXBLOCKNO BlockNo = 18446744073709551615

func BlockNoFromBytes

func BlockNoFromBytes(raw []byte) BlockNo

BlockNoFromBytes represents to deserialize bytes to block no

type BlockProducedNotice added in v0.9.0

type BlockProducedNotice struct {
	ProducerID           []byte   `protobuf:"bytes,1,opt,name=producerID,proto3" json:"producerID,omitempty"`
	BlockNo              uint64   `protobuf:"varint,2,opt,name=blockNo,proto3" json:"blockNo,omitempty"`
	Block                *Block   `protobuf:"bytes,3,opt,name=block,proto3" json:"block,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

BlockProducedNotice is sent when BP created blocks and host peer is BP (or surrogate of BP) and receiving peer is also trusted BP or surrogate of BP. It contains whole block information

func (*BlockProducedNotice) Descriptor added in v0.9.0

func (*BlockProducedNotice) Descriptor() ([]byte, []int)

func (*BlockProducedNotice) GetBlock added in v0.9.0

func (m *BlockProducedNotice) GetBlock() *Block

func (*BlockProducedNotice) GetBlockNo added in v0.9.0

func (m *BlockProducedNotice) GetBlockNo() uint64

func (*BlockProducedNotice) GetProducerID added in v0.9.0

func (m *BlockProducedNotice) GetProducerID() []byte

func (*BlockProducedNotice) ProtoMessage added in v0.9.0

func (*BlockProducedNotice) ProtoMessage()

func (*BlockProducedNotice) Reset added in v0.9.0

func (m *BlockProducedNotice) Reset()

func (*BlockProducedNotice) String added in v0.9.0

func (m *BlockProducedNotice) String() string

func (*BlockProducedNotice) XXX_DiscardUnknown added in v0.9.0

func (m *BlockProducedNotice) XXX_DiscardUnknown()

func (*BlockProducedNotice) XXX_Marshal added in v0.9.0

func (m *BlockProducedNotice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BlockProducedNotice) XXX_Merge added in v0.9.0

func (m *BlockProducedNotice) XXX_Merge(src proto.Message)

func (*BlockProducedNotice) XXX_Size added in v0.9.0

func (m *BlockProducedNotice) XXX_Size() int

func (*BlockProducedNotice) XXX_Unmarshal added in v0.9.0

func (m *BlockProducedNotice) XXX_Unmarshal(b []byte) error

type BlockchainStatus

type BlockchainStatus struct {
	BestBlockHash        []byte   `protobuf:"bytes,1,opt,name=best_block_hash,json=bestBlockHash,proto3" json:"best_block_hash,omitempty"`
	BestHeight           uint64   `protobuf:"varint,2,opt,name=best_height,json=bestHeight,proto3" json:"best_height,omitempty"`
	ConsensusInfo        string   `protobuf:"bytes,3,opt,name=consensus_info,json=consensusInfo,proto3" json:"consensus_info,omitempty"`
	BestChainIdHash      []byte   `protobuf:"bytes,4,opt,name=best_chain_id_hash,json=bestChainIdHash,proto3" json:"best_chain_id_hash,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

BlockchainStatus is current status of blockchain

func (*BlockchainStatus) Descriptor

func (*BlockchainStatus) Descriptor() ([]byte, []int)

func (*BlockchainStatus) GetBestBlockHash

func (m *BlockchainStatus) GetBestBlockHash() []byte

func (*BlockchainStatus) GetBestChainIdHash added in v0.9.0

func (m *BlockchainStatus) GetBestChainIdHash() []byte

func (*BlockchainStatus) GetBestHeight

func (m *BlockchainStatus) GetBestHeight() uint64

func (*BlockchainStatus) GetConsensusInfo added in v0.9.0

func (m *BlockchainStatus) GetConsensusInfo() string

func (*BlockchainStatus) ProtoMessage

func (*BlockchainStatus) ProtoMessage()

func (*BlockchainStatus) Reset

func (m *BlockchainStatus) Reset()

func (*BlockchainStatus) String

func (m *BlockchainStatus) String() string

func (*BlockchainStatus) XXX_DiscardUnknown

func (m *BlockchainStatus) XXX_DiscardUnknown()

func (*BlockchainStatus) XXX_Marshal

func (m *BlockchainStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BlockchainStatus) XXX_Merge

func (m *BlockchainStatus) XXX_Merge(src proto.Message)

func (*BlockchainStatus) XXX_Size

func (m *BlockchainStatus) XXX_Size() int

func (*BlockchainStatus) XXX_Unmarshal

func (m *BlockchainStatus) XXX_Unmarshal(b []byte) error

type CallInfo

type CallInfo struct {
	Name string
	Args []interface{}
}

type ChainAccessor

type ChainAccessor interface {
	GetGenesisInfo() *Genesis
	GetConsensusInfo() string
	GetBestBlock() (*Block, error)
	// GetBlock return block of blockHash. It return nil and error if not found block of that hash or there is a problem in db store
	GetBlock(blockHash []byte) (*Block, error)
	// GetHashByNo returns hash of block. It return nil and error if not found block of that number or there is a problem in db store
	GetHashByNo(blockNo BlockNo) ([]byte, error)
	GetChainStats() string
}

ChainAccessor is an interface for a another actor module to get info of chain

type ChainID added in v0.8.2

type ChainID struct {
	Version   int32  `json:"-"`
	PublicNet bool   `json:"public"`
	MainNet   bool   `json:"mainnet"`
	Magic     string `json:"magic"`
	Consensus string `json:"consensus"`
}

ChainID represents the identity of the chain.

func NewChainID added in v0.9.0

func NewChainID() *ChainID

NewChainID returns a new ChainID initialized as nilChainID.

func (*ChainID) AsDefault added in v0.9.0

func (cid *ChainID) AsDefault()

AsDefault set *cid to the default chaind id (cid must be a valid pointer).

func (*ChainID) Bytes added in v0.8.2

func (cid *ChainID) Bytes() ([]byte, error)

Bytes returns the binary representation of cid.

func (*ChainID) Equals added in v0.8.2

func (cid *ChainID) Equals(rhs *ChainID) bool

Equals reports wheter cid equals rhs or not.

func (*ChainID) Read added in v0.9.0

func (cid *ChainID) Read(data []byte) error

Read deserialize data as a ChainID.

func (ChainID) ToJSON added in v0.9.0

func (cid ChainID) ToJSON() string

ToJSON returns a JSON encoded string of cid.

type ChainId added in v0.9.0

type ChainId struct {
	Magic                string   `protobuf:"bytes,1,opt,name=magic,proto3" json:"magic,omitempty"`
	Public               bool     `protobuf:"varint,2,opt,name=public,proto3" json:"public,omitempty"`
	Mainnet              bool     `protobuf:"varint,3,opt,name=mainnet,proto3" json:"mainnet,omitempty"`
	Consensus            string   `protobuf:"bytes,4,opt,name=consensus,proto3" json:"consensus,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ChainId) Descriptor added in v0.9.0

func (*ChainId) Descriptor() ([]byte, []int)

func (*ChainId) GetConsensus added in v0.9.0

func (m *ChainId) GetConsensus() string

func (*ChainId) GetMagic added in v0.9.0

func (m *ChainId) GetMagic() string

func (*ChainId) GetMainnet added in v0.9.0

func (m *ChainId) GetMainnet() bool

func (*ChainId) GetPublic added in v0.9.0

func (m *ChainId) GetPublic() bool

func (*ChainId) ProtoMessage added in v0.9.0

func (*ChainId) ProtoMessage()

func (*ChainId) Reset added in v0.9.0

func (m *ChainId) Reset()

func (*ChainId) String added in v0.9.0

func (m *ChainId) String() string

func (*ChainId) XXX_DiscardUnknown added in v0.9.0

func (m *ChainId) XXX_DiscardUnknown()

func (*ChainId) XXX_Marshal added in v0.9.0

func (m *ChainId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ChainId) XXX_Merge added in v0.9.0

func (m *ChainId) XXX_Merge(src proto.Message)

func (*ChainId) XXX_Size added in v0.9.0

func (m *ChainId) XXX_Size() int

func (*ChainId) XXX_Unmarshal added in v0.9.0

func (m *ChainId) XXX_Unmarshal(b []byte) error

type ChainInfo added in v0.9.0

type ChainInfo struct {
	Id                   *ChainId `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	BpNumber             uint32   `protobuf:"varint,2,opt,name=bpNumber,proto3" json:"bpNumber,omitempty"`
	Maxblocksize         uint64   `protobuf:"varint,3,opt,name=maxblocksize,proto3" json:"maxblocksize,omitempty"`
	Maxtokens            []byte   `protobuf:"bytes,4,opt,name=maxtokens,proto3" json:"maxtokens,omitempty"`
	Stakingminimum       []byte   `protobuf:"bytes,5,opt,name=stakingminimum,proto3" json:"stakingminimum,omitempty"`
	Totalstaking         []byte   `protobuf:"bytes,6,opt,name=totalstaking,proto3" json:"totalstaking,omitempty"`
	Gasprice             []byte   `protobuf:"bytes,7,opt,name=gasprice,proto3" json:"gasprice,omitempty"`
	Nameprice            []byte   `protobuf:"bytes,8,opt,name=nameprice,proto3" json:"nameprice,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

ChainInfo returns chain configuration

func (*ChainInfo) Descriptor added in v0.9.0

func (*ChainInfo) Descriptor() ([]byte, []int)

func (*ChainInfo) GetBpNumber added in v0.9.0

func (m *ChainInfo) GetBpNumber() uint32

func (*ChainInfo) GetGasprice added in v0.9.0

func (m *ChainInfo) GetGasprice() []byte

func (*ChainInfo) GetId added in v0.9.0

func (m *ChainInfo) GetId() *ChainId

func (*ChainInfo) GetMaxblocksize added in v0.9.0

func (m *ChainInfo) GetMaxblocksize() uint64

func (*ChainInfo) GetMaxtokens added in v0.9.0

func (m *ChainInfo) GetMaxtokens() []byte

func (*ChainInfo) GetNameprice added in v0.9.0

func (m *ChainInfo) GetNameprice() []byte

func (*ChainInfo) GetStakingminimum added in v0.9.0

func (m *ChainInfo) GetStakingminimum() []byte

func (*ChainInfo) GetTotalstaking added in v0.9.0

func (m *ChainInfo) GetTotalstaking() []byte

func (*ChainInfo) ProtoMessage added in v0.9.0

func (*ChainInfo) ProtoMessage()

func (*ChainInfo) Reset added in v0.9.0

func (m *ChainInfo) Reset()

func (*ChainInfo) String added in v0.9.0

func (m *ChainInfo) String() string

func (*ChainInfo) XXX_DiscardUnknown added in v0.9.0

func (m *ChainInfo) XXX_DiscardUnknown()

func (*ChainInfo) XXX_Marshal added in v0.9.0

func (m *ChainInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ChainInfo) XXX_Merge added in v0.9.0

func (m *ChainInfo) XXX_Merge(src proto.Message)

func (*ChainInfo) XXX_Size added in v0.9.0

func (m *ChainInfo) XXX_Size() int

func (*ChainInfo) XXX_Unmarshal added in v0.9.0

func (m *ChainInfo) XXX_Unmarshal(b []byte) error

type ChainStats added in v0.9.0

type ChainStats struct {
	Report               string   `protobuf:"bytes,1,opt,name=report,proto3" json:"report,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

ChainStats corresponds to a chain statistics report.

func (*ChainStats) Descriptor added in v0.9.0

func (*ChainStats) Descriptor() ([]byte, []int)

func (*ChainStats) GetReport added in v0.9.0

func (m *ChainStats) GetReport() string

func (*ChainStats) ProtoMessage added in v0.9.0

func (*ChainStats) ProtoMessage()

func (*ChainStats) Reset added in v0.9.0

func (m *ChainStats) Reset()

func (*ChainStats) String added in v0.9.0

func (m *ChainStats) String() string

func (*ChainStats) XXX_DiscardUnknown added in v0.9.0

func (m *ChainStats) XXX_DiscardUnknown()

func (*ChainStats) XXX_Marshal added in v0.9.0

func (m *ChainStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ChainStats) XXX_Merge added in v0.9.0

func (m *ChainStats) XXX_Merge(src proto.Message)

func (*ChainStats) XXX_Size added in v0.9.0

func (m *ChainStats) XXX_Size() int

func (*ChainStats) XXX_Unmarshal added in v0.9.0

func (m *ChainStats) XXX_Unmarshal(b []byte) error

type CommitResult

type CommitResult struct {
	Hash                 []byte       `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	Error                CommitStatus `protobuf:"varint,2,opt,name=error,proto3,enum=types.CommitStatus" json:"error,omitempty"`
	Detail               string       `protobuf:"bytes,3,opt,name=detail,proto3" json:"detail,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*CommitResult) Descriptor

func (*CommitResult) Descriptor() ([]byte, []int)

func (*CommitResult) GetDetail

func (m *CommitResult) GetDetail() string

func (*CommitResult) GetError

func (m *CommitResult) GetError() CommitStatus

func (*CommitResult) GetHash

func (m *CommitResult) GetHash() []byte

func (*CommitResult) ProtoMessage

func (*CommitResult) ProtoMessage()

func (*CommitResult) Reset

func (m *CommitResult) Reset()

func (*CommitResult) String

func (m *CommitResult) String() string

func (*CommitResult) XXX_DiscardUnknown

func (m *CommitResult) XXX_DiscardUnknown()

func (*CommitResult) XXX_Marshal

func (m *CommitResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CommitResult) XXX_Merge

func (m *CommitResult) XXX_Merge(src proto.Message)

func (*CommitResult) XXX_Size

func (m *CommitResult) XXX_Size() int

func (*CommitResult) XXX_Unmarshal

func (m *CommitResult) XXX_Unmarshal(b []byte) error

type CommitResultList

type CommitResultList struct {
	Results              []*CommitResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

func (*CommitResultList) Descriptor

func (*CommitResultList) Descriptor() ([]byte, []int)

func (*CommitResultList) GetResults

func (m *CommitResultList) GetResults() []*CommitResult

func (*CommitResultList) ProtoMessage

func (*CommitResultList) ProtoMessage()

func (*CommitResultList) Reset

func (m *CommitResultList) Reset()

func (*CommitResultList) String

func (m *CommitResultList) String() string

func (*CommitResultList) XXX_DiscardUnknown

func (m *CommitResultList) XXX_DiscardUnknown()

func (*CommitResultList) XXX_Marshal

func (m *CommitResultList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CommitResultList) XXX_Merge

func (m *CommitResultList) XXX_Merge(src proto.Message)

func (*CommitResultList) XXX_Size

func (m *CommitResultList) XXX_Size() int

func (*CommitResultList) XXX_Unmarshal

func (m *CommitResultList) XXX_Unmarshal(b []byte) error

type CommitStatus

type CommitStatus int32
const (
	CommitStatus_TX_OK                   CommitStatus = 0
	CommitStatus_TX_NONCE_TOO_LOW        CommitStatus = 1
	CommitStatus_TX_ALREADY_EXISTS       CommitStatus = 2
	CommitStatus_TX_INVALID_HASH         CommitStatus = 3
	CommitStatus_TX_INVALID_SIGN         CommitStatus = 4
	CommitStatus_TX_INVALID_FORMAT       CommitStatus = 5
	CommitStatus_TX_INSUFFICIENT_BALANCE CommitStatus = 6
	CommitStatus_TX_HAS_SAME_NONCE       CommitStatus = 7
	CommitStatus_TX_INTERNAL_ERROR       CommitStatus = 9
)

func (CommitStatus) EnumDescriptor

func (CommitStatus) EnumDescriptor() ([]byte, []int)

func (CommitStatus) String

func (x CommitStatus) String() string

type ConfigItem added in v0.9.0

type ConfigItem struct {
	Props                map[string]string `` /* 151-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func AddCategory added in v0.9.0

func AddCategory(confs map[string]*ConfigItem, category string) *ConfigItem

func (*ConfigItem) Add added in v0.9.0

func (ci *ConfigItem) Add(key, value string) *ConfigItem

func (*ConfigItem) AddBool added in v0.9.0

func (ci *ConfigItem) AddBool(key string, value bool) *ConfigItem

func (*ConfigItem) AddFloat added in v0.9.0

func (ci *ConfigItem) AddFloat(key string, value float64) *ConfigItem

func (*ConfigItem) AddInt added in v0.9.0

func (ci *ConfigItem) AddInt(key string, value int) *ConfigItem

func (*ConfigItem) Descriptor added in v0.9.0

func (*ConfigItem) Descriptor() ([]byte, []int)

func (*ConfigItem) GetProps added in v0.9.0

func (m *ConfigItem) GetProps() map[string]string

func (*ConfigItem) ProtoMessage added in v0.9.0

func (*ConfigItem) ProtoMessage()

func (*ConfigItem) Reset added in v0.9.0

func (m *ConfigItem) Reset()

func (*ConfigItem) String added in v0.9.0

func (m *ConfigItem) String() string

func (*ConfigItem) XXX_DiscardUnknown added in v0.9.0

func (m *ConfigItem) XXX_DiscardUnknown()

func (*ConfigItem) XXX_Marshal added in v0.9.0

func (m *ConfigItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConfigItem) XXX_Merge added in v0.9.0

func (m *ConfigItem) XXX_Merge(src proto.Message)

func (*ConfigItem) XXX_Size added in v0.9.0

func (m *ConfigItem) XXX_Size() int

func (*ConfigItem) XXX_Unmarshal added in v0.9.0

func (m *ConfigItem) XXX_Unmarshal(b []byte) error

type ConsensusInfo added in v0.9.0

type ConsensusInfo struct {
	Type                 string   `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	Info                 string   `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"`
	Bps                  []string `protobuf:"bytes,3,rep,name=bps,proto3" json:"bps,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

info and bps is json string

func (*ConsensusInfo) Descriptor added in v0.9.0

func (*ConsensusInfo) Descriptor() ([]byte, []int)

func (*ConsensusInfo) GetBps added in v0.9.0

func (m *ConsensusInfo) GetBps() []string

func (*ConsensusInfo) GetInfo added in v0.9.0

func (m *ConsensusInfo) GetInfo() string

func (*ConsensusInfo) GetType added in v0.9.0

func (m *ConsensusInfo) GetType() string

func (*ConsensusInfo) ProtoMessage added in v0.9.0

func (*ConsensusInfo) ProtoMessage()

func (*ConsensusInfo) Reset added in v0.9.0

func (m *ConsensusInfo) Reset()

func (*ConsensusInfo) String added in v0.9.0

func (m *ConsensusInfo) String() string

func (*ConsensusInfo) XXX_DiscardUnknown added in v0.9.0

func (m *ConsensusInfo) XXX_DiscardUnknown()

func (*ConsensusInfo) XXX_Marshal added in v0.9.0

func (m *ConsensusInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConsensusInfo) XXX_Merge added in v0.9.0

func (m *ConsensusInfo) XXX_Merge(src proto.Message)

func (*ConsensusInfo) XXX_Size added in v0.9.0

func (m *ConsensusInfo) XXX_Size() int

func (*ConsensusInfo) XXX_Unmarshal added in v0.9.0

func (m *ConsensusInfo) XXX_Unmarshal(b []byte) error

type ContractVarProof added in v0.8.1

type ContractVarProof struct {
	Value                []byte   `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	Inclusion            bool     `protobuf:"varint,2,opt,name=inclusion,proto3" json:"inclusion,omitempty"`
	Key                  string   `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
	ProofKey             []byte   `protobuf:"bytes,4,opt,name=proofKey,proto3" json:"proofKey,omitempty"`
	ProofVal             []byte   `protobuf:"bytes,5,opt,name=proofVal,proto3" json:"proofVal,omitempty"`
	Bitmap               []byte   `protobuf:"bytes,6,opt,name=bitmap,proto3" json:"bitmap,omitempty"`
	Height               uint32   `protobuf:"varint,7,opt,name=height,proto3" json:"height,omitempty"`
	AuditPath            [][]byte `protobuf:"bytes,8,rep,name=auditPath,proto3" json:"auditPath,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ContractVarProof) Descriptor added in v0.8.1

func (*ContractVarProof) Descriptor() ([]byte, []int)

func (*ContractVarProof) GetAuditPath added in v0.8.1

func (m *ContractVarProof) GetAuditPath() [][]byte

func (*ContractVarProof) GetBitmap added in v0.8.1

func (m *ContractVarProof) GetBitmap() []byte

func (*ContractVarProof) GetHeight added in v0.8.1

func (m *ContractVarProof) GetHeight() uint32

func (*ContractVarProof) GetInclusion added in v0.8.1

func (m *ContractVarProof) GetInclusion() bool

func (*ContractVarProof) GetKey added in v0.9.0

func (m *ContractVarProof) GetKey() string

func (*ContractVarProof) GetProofKey added in v0.8.1

func (m *ContractVarProof) GetProofKey() []byte

func (*ContractVarProof) GetProofVal added in v0.8.1

func (m *ContractVarProof) GetProofVal() []byte

func (*ContractVarProof) GetValue added in v0.8.1

func (m *ContractVarProof) GetValue() []byte

func (*ContractVarProof) ProtoMessage added in v0.8.1

func (*ContractVarProof) ProtoMessage()

func (*ContractVarProof) Reset added in v0.8.1

func (m *ContractVarProof) Reset()

func (*ContractVarProof) String added in v0.8.1

func (m *ContractVarProof) String() string

func (*ContractVarProof) XXX_DiscardUnknown added in v0.8.1

func (m *ContractVarProof) XXX_DiscardUnknown()

func (*ContractVarProof) XXX_Marshal added in v0.8.1

func (m *ContractVarProof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ContractVarProof) XXX_Merge added in v0.8.1

func (m *ContractVarProof) XXX_Merge(src proto.Message)

func (*ContractVarProof) XXX_Size added in v0.8.1

func (m *ContractVarProof) XXX_Size() int

func (*ContractVarProof) XXX_Unmarshal added in v0.8.1

func (m *ContractVarProof) XXX_Unmarshal(b []byte) error

type Empty

type Empty struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Empty) Descriptor

func (*Empty) Descriptor() ([]byte, []int)

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) Reset

func (m *Empty) Reset()

func (*Empty) String

func (m *Empty) String() string

func (*Empty) XXX_DiscardUnknown

func (m *Empty) XXX_DiscardUnknown()

func (*Empty) XXX_Marshal

func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Empty) XXX_Merge

func (m *Empty) XXX_Merge(src proto.Message)

func (*Empty) XXX_Size

func (m *Empty) XXX_Size() int

func (*Empty) XXX_Unmarshal

func (m *Empty) XXX_Unmarshal(b []byte) error

type Event added in v0.9.0

type Event struct {
	ContractAddress      []byte   `protobuf:"bytes,1,opt,name=contractAddress,proto3" json:"contractAddress,omitempty"`
	EventName            string   `protobuf:"bytes,2,opt,name=eventName,proto3" json:"eventName,omitempty"`
	JsonArgs             string   `protobuf:"bytes,3,opt,name=jsonArgs,proto3" json:"jsonArgs,omitempty"`
	EventIdx             int32    `protobuf:"varint,4,opt,name=eventIdx,proto3" json:"eventIdx,omitempty"`
	TxHash               []byte   `protobuf:"bytes,5,opt,name=txHash,proto3" json:"txHash,omitempty"`
	BlockHash            []byte   `protobuf:"bytes,6,opt,name=blockHash,proto3" json:"blockHash,omitempty"`
	BlockNo              uint64   `protobuf:"varint,7,opt,name=blockNo,proto3" json:"blockNo,omitempty"`
	TxIndex              int32    `protobuf:"varint,8,opt,name=txIndex,proto3" json:"txIndex,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Event) Descriptor added in v0.9.0

func (*Event) Descriptor() ([]byte, []int)

func (*Event) Filter added in v0.9.0

func (ev *Event) Filter(filter *FilterInfo, argFilter []ArgFilter) bool

func (*Event) GetBlockHash added in v0.9.0

func (m *Event) GetBlockHash() []byte

func (*Event) GetBlockNo added in v0.9.0

func (m *Event) GetBlockNo() uint64

func (*Event) GetContractAddress added in v0.9.0

func (m *Event) GetContractAddress() []byte

func (*Event) GetEventIdx added in v0.9.0

func (m *Event) GetEventIdx() int32

func (*Event) GetEventName added in v0.9.0

func (m *Event) GetEventName() string

func (*Event) GetJsonArgs added in v0.9.0

func (m *Event) GetJsonArgs() string

func (*Event) GetTxHash added in v0.9.0

func (m *Event) GetTxHash() []byte

func (*Event) GetTxIndex added in v0.9.0

func (m *Event) GetTxIndex() int32

func (*Event) MarshalBinary added in v0.9.0

func (ev *Event) MarshalBinary() ([]byte, error)

func (*Event) MarshalJSON added in v0.9.0

func (ev *Event) MarshalJSON() ([]byte, error)

func (*Event) MarshalMerkleBinary added in v0.9.0

func (ev *Event) MarshalMerkleBinary() ([]byte, error)

func (*Event) ProtoMessage added in v0.9.0

func (*Event) ProtoMessage()

func (*Event) Reset added in v0.9.0

func (m *Event) Reset()

func (*Event) SetMemoryInfo added in v0.9.0

func (ev *Event) SetMemoryInfo(receipt *Receipt, blkHash []byte, blkNo BlockNo, txIdx int32)

func (*Event) String added in v0.9.0

func (m *Event) String() string

func (*Event) UnmarshalBinary added in v0.9.0

func (ev *Event) UnmarshalBinary(data []byte) ([]byte, error)

func (*Event) XXX_DiscardUnknown added in v0.9.0

func (m *Event) XXX_DiscardUnknown()

func (*Event) XXX_Marshal added in v0.9.0

func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Event) XXX_Merge added in v0.9.0

func (m *Event) XXX_Merge(src proto.Message)

func (*Event) XXX_Size added in v0.9.0

func (m *Event) XXX_Size() int

func (*Event) XXX_Unmarshal added in v0.9.0

func (m *Event) XXX_Unmarshal(b []byte) error

type EventList added in v0.9.0

type EventList struct {
	Events               []*Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*EventList) Descriptor added in v0.9.0

func (*EventList) Descriptor() ([]byte, []int)

func (*EventList) GetEvents added in v0.9.0

func (m *EventList) GetEvents() []*Event

func (*EventList) ProtoMessage added in v0.9.0

func (*EventList) ProtoMessage()

func (*EventList) Reset added in v0.9.0

func (m *EventList) Reset()

func (*EventList) String added in v0.9.0

func (m *EventList) String() string

func (*EventList) XXX_DiscardUnknown added in v0.9.0

func (m *EventList) XXX_DiscardUnknown()

func (*EventList) XXX_Marshal added in v0.9.0

func (m *EventList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EventList) XXX_Merge added in v0.9.0

func (m *EventList) XXX_Merge(src proto.Message)

func (*EventList) XXX_Size added in v0.9.0

func (m *EventList) XXX_Size() int

func (*EventList) XXX_Unmarshal added in v0.9.0

func (m *EventList) XXX_Unmarshal(b []byte) error

type FilterInfo added in v0.9.0

type FilterInfo struct {
	ContractAddress      []byte   `protobuf:"bytes,1,opt,name=contractAddress,proto3" json:"contractAddress,omitempty"`
	EventName            string   `protobuf:"bytes,2,opt,name=eventName,proto3" json:"eventName,omitempty"`
	Blockfrom            uint64   `protobuf:"varint,3,opt,name=blockfrom,proto3" json:"blockfrom,omitempty"`
	Blockto              uint64   `protobuf:"varint,4,opt,name=blockto,proto3" json:"blockto,omitempty"`
	Desc                 bool     `protobuf:"varint,5,opt,name=desc,proto3" json:"desc,omitempty"`
	ArgFilter            []byte   `protobuf:"bytes,6,opt,name=argFilter,proto3" json:"argFilter,omitempty"`
	RecentBlockCnt       int32    `protobuf:"varint,7,opt,name=recentBlockCnt,proto3" json:"recentBlockCnt,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*FilterInfo) Descriptor added in v0.9.0

func (*FilterInfo) Descriptor() ([]byte, []int)

func (*FilterInfo) GetArgFilter added in v0.9.0

func (m *FilterInfo) GetArgFilter() []byte

func (*FilterInfo) GetBlockfrom added in v0.9.0

func (m *FilterInfo) GetBlockfrom() uint64

func (*FilterInfo) GetBlockto added in v0.9.0

func (m *FilterInfo) GetBlockto() uint64

func (*FilterInfo) GetContractAddress added in v0.9.0

func (m *FilterInfo) GetContractAddress() []byte

func (*FilterInfo) GetDesc added in v0.9.0

func (m *FilterInfo) GetDesc() bool

func (*FilterInfo) GetEventName added in v0.9.0

func (m *FilterInfo) GetEventName() string

func (*FilterInfo) GetExArgFilter added in v0.9.0

func (fi *FilterInfo) GetExArgFilter() ([]ArgFilter, error)

func (*FilterInfo) GetRecentBlockCnt added in v0.9.0

func (m *FilterInfo) GetRecentBlockCnt() int32

func (*FilterInfo) ProtoMessage added in v0.9.0

func (*FilterInfo) ProtoMessage()

func (*FilterInfo) Reset added in v0.9.0

func (m *FilterInfo) Reset()

func (*FilterInfo) String added in v0.9.0

func (m *FilterInfo) String() string

func (*FilterInfo) ValidateCheck added in v0.9.0

func (fi *FilterInfo) ValidateCheck(to uint64) error

func (*FilterInfo) XXX_DiscardUnknown added in v0.9.0

func (m *FilterInfo) XXX_DiscardUnknown()

func (*FilterInfo) XXX_Marshal added in v0.9.0

func (m *FilterInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FilterInfo) XXX_Merge added in v0.9.0

func (m *FilterInfo) XXX_Merge(src proto.Message)

func (*FilterInfo) XXX_Size added in v0.9.0

func (m *FilterInfo) XXX_Size() int

func (*FilterInfo) XXX_Unmarshal added in v0.9.0

func (m *FilterInfo) XXX_Unmarshal(b []byte) error

type FnArgument

type FnArgument struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*FnArgument) Descriptor

func (*FnArgument) Descriptor() ([]byte, []int)

func (*FnArgument) GetName

func (m *FnArgument) GetName() string

func (*FnArgument) ProtoMessage

func (*FnArgument) ProtoMessage()

func (*FnArgument) Reset

func (m *FnArgument) Reset()

func (*FnArgument) String

func (m *FnArgument) String() string

func (*FnArgument) XXX_DiscardUnknown

func (m *FnArgument) XXX_DiscardUnknown()

func (*FnArgument) XXX_Marshal

func (m *FnArgument) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FnArgument) XXX_Merge

func (m *FnArgument) XXX_Merge(src proto.Message)

func (*FnArgument) XXX_Size

func (m *FnArgument) XXX_Size() int

func (*FnArgument) XXX_Unmarshal

func (m *FnArgument) XXX_Unmarshal(b []byte) error

type Function

type Function struct {
	Name                 string        `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Arguments            []*FnArgument `protobuf:"bytes,2,rep,name=arguments,proto3" json:"arguments,omitempty"`
	Payable              bool          `protobuf:"varint,3,opt,name=payable,proto3" json:"payable,omitempty"`
	View                 bool          `protobuf:"varint,4,opt,name=view,proto3" json:"view,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

func (*Function) Descriptor

func (*Function) Descriptor() ([]byte, []int)

func (*Function) GetArguments

func (m *Function) GetArguments() []*FnArgument

func (*Function) GetName

func (m *Function) GetName() string

func (*Function) GetPayable added in v0.9.0

func (m *Function) GetPayable() bool

func (*Function) GetView added in v0.9.0

func (m *Function) GetView() bool

func (*Function) ProtoMessage

func (*Function) ProtoMessage()

func (*Function) Reset

func (m *Function) Reset()

func (*Function) String

func (m *Function) String() string

func (*Function) XXX_DiscardUnknown

func (m *Function) XXX_DiscardUnknown()

func (*Function) XXX_Marshal

func (m *Function) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Function) XXX_Merge

func (m *Function) XXX_Merge(src proto.Message)

func (*Function) XXX_Size

func (m *Function) XXX_Size() int

func (*Function) XXX_Unmarshal

func (m *Function) XXX_Unmarshal(b []byte) error

type Genesis

type Genesis struct {
	ID        ChainID           `json:"chain_id,omitempty"`
	Timestamp int64             `json:"timestamp,omitempty"`
	Balance   map[string]string `json:"balance"`
	BPs       []string          `json:"bps"`
	// contains filtered or unexported fields
}

Genesis represents genesis block

func GetDefaultGenesis

func GetDefaultGenesis() *Genesis

GetDefaultGenesis returns default genesis structure

func GetGenesisFromBytes added in v0.8.2

func GetGenesisFromBytes(b []byte) *Genesis

GetGenesisFromBytes decodes & return Genesis from b.

func GetMainNetGenesis added in v0.9.0

func GetMainNetGenesis() *Genesis

func GetTestGenesis

func GetTestGenesis() *Genesis

GetTestGenesis returns Gensis object for a unit test.

func GetTestNetGenesis added in v0.9.0

func GetTestNetGenesis() *Genesis

func (*Genesis) AddBalance added in v0.9.0

func (g *Genesis) AddBalance(bal *big.Int)

AddBalance adds bal to g.totalBalance.

func (*Genesis) Block

func (g *Genesis) Block() *Block

Block returns Block corresponding to g.

func (Genesis) Bytes added in v0.8.2

func (g Genesis) Bytes() []byte

Bytes returns byte-encoded BPs from g.

func (*Genesis) ChainID added in v0.8.2

func (g *Genesis) ChainID() ([]byte, error)

ChainID returns the binary representation of g.ID.

func (Genesis) ConsensusType added in v0.9.0

func (g Genesis) ConsensusType() string

ConsensusType retruns g.ID.ConsensusType.

func (Genesis) HasDevChainID added in v0.9.0

func (g Genesis) HasDevChainID() bool

func (Genesis) HasPrivateChainID added in v0.9.0

func (g Genesis) HasPrivateChainID() bool

func (Genesis) IsAergoPublicChain added in v0.9.0

func (g Genesis) IsAergoPublicChain() bool

func (Genesis) PublicNet added in v0.9.0

func (g Genesis) PublicNet() bool

PublicNet reports whether g corresponds to PublicNet.

func (*Genesis) SetBlock added in v0.9.0

func (g *Genesis) SetBlock(block *Block)

SetBlock sets g.block to block if g.block == nil.

func (*Genesis) SetTotalBalance added in v0.9.0

func (g *Genesis) SetTotalBalance(v []byte)

SetTotalBalance sets g.totalBalance to v if g.totalBlance has no valid value (nil).

func (*Genesis) TotalBalance added in v0.9.0

func (g *Genesis) TotalBalance() *big.Int

TotalBalance returns the total initial balance of the chain.

func (*Genesis) Validate added in v0.9.0

func (g *Genesis) Validate() error

Block returns Block corresponding to g. If g.block == nil, it genreates a genesis block before it returns.

type GetAncestorRequest added in v0.8.1

type GetAncestorRequest struct {
	// Hash indicated referenced sparse block hash array of longest chain(caller).
	Hashes               [][]byte `protobuf:"bytes,1,rep,name=hashes,proto3" json:"hashes,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetAncestorRequest) Descriptor added in v0.8.1

func (*GetAncestorRequest) Descriptor() ([]byte, []int)

func (*GetAncestorRequest) GetHashes added in v0.8.1

func (m *GetAncestorRequest) GetHashes() [][]byte

func (*GetAncestorRequest) ProtoMessage added in v0.8.1

func (*GetAncestorRequest) ProtoMessage()

func (*GetAncestorRequest) Reset added in v0.8.1

func (m *GetAncestorRequest) Reset()

func (*GetAncestorRequest) String added in v0.8.1

func (m *GetAncestorRequest) String() string

func (*GetAncestorRequest) XXX_DiscardUnknown added in v0.8.1

func (m *GetAncestorRequest) XXX_DiscardUnknown()

func (*GetAncestorRequest) XXX_Marshal added in v0.8.1

func (m *GetAncestorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetAncestorRequest) XXX_Merge added in v0.8.1

func (m *GetAncestorRequest) XXX_Merge(src proto.Message)

func (*GetAncestorRequest) XXX_Size added in v0.8.1

func (m *GetAncestorRequest) XXX_Size() int

func (*GetAncestorRequest) XXX_Unmarshal added in v0.8.1

func (m *GetAncestorRequest) XXX_Unmarshal(b []byte) error

type GetAncestorResponse added in v0.8.1

type GetAncestorResponse struct {
	Status               ResultStatus `protobuf:"varint,1,opt,name=status,proto3,enum=types.ResultStatus" json:"status,omitempty"`
	AncestorHash         []byte       `protobuf:"bytes,2,opt,name=ancestorHash,proto3" json:"ancestorHash,omitempty"`
	AncestorNo           uint64       `protobuf:"varint,3,opt,name=ancestorNo,proto3" json:"ancestorNo,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*GetAncestorResponse) Descriptor added in v0.8.1

func (*GetAncestorResponse) Descriptor() ([]byte, []int)

func (*GetAncestorResponse) GetAncestorHash added in v0.8.1

func (m *GetAncestorResponse) GetAncestorHash() []byte

func (*GetAncestorResponse) GetAncestorNo added in v0.8.1

func (m *GetAncestorResponse) GetAncestorNo() uint64

func (*GetAncestorResponse) GetStatus added in v0.8.1

func (m *GetAncestorResponse) GetStatus() ResultStatus

func (*GetAncestorResponse) ProtoMessage added in v0.8.1

func (*GetAncestorResponse) ProtoMessage()

func (*GetAncestorResponse) Reset added in v0.8.1

func (m *GetAncestorResponse) Reset()

func (*GetAncestorResponse) String added in v0.8.1

func (m *GetAncestorResponse) String() string

func (*GetAncestorResponse) XXX_DiscardUnknown added in v0.8.1

func (m *GetAncestorResponse) XXX_DiscardUnknown()

func (*GetAncestorResponse) XXX_Marshal added in v0.8.1

func (m *GetAncestorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetAncestorResponse) XXX_Merge added in v0.8.1

func (m *GetAncestorResponse) XXX_Merge(src proto.Message)

func (*GetAncestorResponse) XXX_Size added in v0.8.1

func (m *GetAncestorResponse) XXX_Size() int

func (*GetAncestorResponse) XXX_Unmarshal added in v0.8.1

func (m *GetAncestorResponse) XXX_Unmarshal(b []byte) error

type GetBlockHeadersRequest

type GetBlockHeadersRequest struct {
	// Hash indicated referenced block hash. server will return headers from this block.
	Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	// Block height instead of hash will be used for the first returned block, if hash is nil or empty
	Height uint64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
	Offset uint64 `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"`
	Size   uint32 `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"`
	// default is false.
	Asc                  bool     `protobuf:"varint,5,opt,name=asc,proto3" json:"asc,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

GetBlockHeadersRequest

func (*GetBlockHeadersRequest) Descriptor

func (*GetBlockHeadersRequest) Descriptor() ([]byte, []int)

func (*GetBlockHeadersRequest) GetAsc

func (m *GetBlockHeadersRequest) GetAsc() bool

func (*GetBlockHeadersRequest) GetHash

func (m *GetBlockHeadersRequest) GetHash() []byte

func (*GetBlockHeadersRequest) GetHeight

func (m *GetBlockHeadersRequest) GetHeight() uint64

func (*GetBlockHeadersRequest) GetOffset

func (m *GetBlockHeadersRequest) GetOffset() uint64

func (*GetBlockHeadersRequest) GetSize

func (m *GetBlockHeadersRequest) GetSize() uint32

func (*GetBlockHeadersRequest) ProtoMessage

func (*GetBlockHeadersRequest) ProtoMessage()

func (*GetBlockHeadersRequest) Reset

func (m *GetBlockHeadersRequest) Reset()

func (*GetBlockHeadersRequest) String

func (m *GetBlockHeadersRequest) String() string

func (*GetBlockHeadersRequest) XXX_DiscardUnknown

func (m *GetBlockHeadersRequest) XXX_DiscardUnknown()

func (*GetBlockHeadersRequest) XXX_Marshal

func (m *GetBlockHeadersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetBlockHeadersRequest) XXX_Merge

func (m *GetBlockHeadersRequest) XXX_Merge(src proto.Message)

func (*GetBlockHeadersRequest) XXX_Size

func (m *GetBlockHeadersRequest) XXX_Size() int

func (*GetBlockHeadersRequest) XXX_Unmarshal

func (m *GetBlockHeadersRequest) XXX_Unmarshal(b []byte) error

type GetBlockHeadersResponse

type GetBlockHeadersResponse struct {
	Status               ResultStatus   `protobuf:"varint,1,opt,name=status,proto3,enum=types.ResultStatus" json:"status,omitempty"`
	Hashes               [][]byte       `protobuf:"bytes,2,rep,name=hashes,proto3" json:"hashes,omitempty"`
	Headers              []*BlockHeader `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty"`
	HasNext              bool           `protobuf:"varint,4,opt,name=hasNext,proto3" json:"hasNext,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

GetBlockResponse contains response of GetBlockRequest.

func (*GetBlockHeadersResponse) Descriptor

func (*GetBlockHeadersResponse) Descriptor() ([]byte, []int)

func (*GetBlockHeadersResponse) GetHasNext

func (m *GetBlockHeadersResponse) GetHasNext() bool

func (*GetBlockHeadersResponse) GetHashes

func (m *GetBlockHeadersResponse) GetHashes() [][]byte

func (*GetBlockHeadersResponse) GetHeaders

func (m *GetBlockHeadersResponse) GetHeaders() []*BlockHeader

func (*GetBlockHeadersResponse) GetStatus

func (m *GetBlockHeadersResponse) GetStatus() ResultStatus

func (*GetBlockHeadersResponse) ProtoMessage

func (*GetBlockHeadersResponse) ProtoMessage()

func (*GetBlockHeadersResponse) Reset

func (m *GetBlockHeadersResponse) Reset()

func (*GetBlockHeadersResponse) String

func (m *GetBlockHeadersResponse) String() string

func (*GetBlockHeadersResponse) XXX_DiscardUnknown

func (m *GetBlockHeadersResponse) XXX_DiscardUnknown()

func (*GetBlockHeadersResponse) XXX_Marshal

func (m *GetBlockHeadersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetBlockHeadersResponse) XXX_Merge

func (m *GetBlockHeadersResponse) XXX_Merge(src proto.Message)

func (*GetBlockHeadersResponse) XXX_Size

func (m *GetBlockHeadersResponse) XXX_Size() int

func (*GetBlockHeadersResponse) XXX_Unmarshal

func (m *GetBlockHeadersResponse) XXX_Unmarshal(b []byte) error

type GetBlockRequest

type GetBlockRequest struct {
	Hashes               [][]byte `protobuf:"bytes,1,rep,name=hashes,proto3" json:"hashes,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

GetBlockRequest request blocks informations, not just single block.

func (*GetBlockRequest) Descriptor

func (*GetBlockRequest) Descriptor() ([]byte, []int)

func (*GetBlockRequest) GetHashes

func (m *GetBlockRequest) GetHashes() [][]byte

func (*GetBlockRequest) ProtoMessage

func (*GetBlockRequest) ProtoMessage()

func (*GetBlockRequest) Reset

func (m *GetBlockRequest) Reset()

func (*GetBlockRequest) String

func (m *GetBlockRequest) String() string

func (*GetBlockRequest) XXX_DiscardUnknown

func (m *GetBlockRequest) XXX_DiscardUnknown()

func (*GetBlockRequest) XXX_Marshal

func (m *GetBlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetBlockRequest) XXX_Merge

func (m *GetBlockRequest) XXX_Merge(src proto.Message)

func (*GetBlockRequest) XXX_Size

func (m *GetBlockRequest) XXX_Size() int

func (*GetBlockRequest) XXX_Unmarshal

func (m *GetBlockRequest) XXX_Unmarshal(b []byte) error

type GetBlockResponse

type GetBlockResponse struct {
	Status               ResultStatus `protobuf:"varint,1,opt,name=status,proto3,enum=types.ResultStatus" json:"status,omitempty"`
	Blocks               []*Block     `protobuf:"bytes,2,rep,name=blocks,proto3" json:"blocks,omitempty"`
	HasNext              bool         `protobuf:"varint,3,opt,name=hasNext,proto3" json:"hasNext,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

GetBlockResponse contains response of GetBlockRequest.

func (*GetBlockResponse) Descriptor

func (*GetBlockResponse) Descriptor() ([]byte, []int)

func (*GetBlockResponse) GetBlocks

func (m *GetBlockResponse) GetBlocks() []*Block

func (*GetBlockResponse) GetHasNext

func (m *GetBlockResponse) GetHasNext() bool

func (*GetBlockResponse) GetStatus

func (m *GetBlockResponse) GetStatus() ResultStatus

func (*GetBlockResponse) ProtoMessage

func (*GetBlockResponse) ProtoMessage()

func (*GetBlockResponse) Reset

func (m *GetBlockResponse) Reset()

func (*GetBlockResponse) String

func (m *GetBlockResponse) String() string

func (*GetBlockResponse) XXX_DiscardUnknown

func (m *GetBlockResponse) XXX_DiscardUnknown()

func (*GetBlockResponse) XXX_Marshal

func (m *GetBlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetBlockResponse) XXX_Merge

func (m *GetBlockResponse) XXX_Merge(src proto.Message)

func (*GetBlockResponse) XXX_Size

func (m *GetBlockResponse) XXX_Size() int

func (*GetBlockResponse) XXX_Unmarshal

func (m *GetBlockResponse) XXX_Unmarshal(b []byte) error

type GetClusterInfoRequest added in v0.9.0

type GetClusterInfoRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

data types for raft support GetClusterInfoRequest

func (*GetClusterInfoRequest) Descriptor added in v0.9.0

func (*GetClusterInfoRequest) Descriptor() ([]byte, []int)

func (*GetClusterInfoRequest) ProtoMessage added in v0.9.0

func (*GetClusterInfoRequest) ProtoMessage()

func (*GetClusterInfoRequest) Reset added in v0.9.0

func (m *GetClusterInfoRequest) Reset()

func (*GetClusterInfoRequest) String added in v0.9.0

func (m *GetClusterInfoRequest) String() string

func (*GetClusterInfoRequest) XXX_DiscardUnknown added in v0.9.0

func (m *GetClusterInfoRequest) XXX_DiscardUnknown()

func (*GetClusterInfoRequest) XXX_Marshal added in v0.9.0

func (m *GetClusterInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetClusterInfoRequest) XXX_Merge added in v0.9.0

func (m *GetClusterInfoRequest) XXX_Merge(src proto.Message)

func (*GetClusterInfoRequest) XXX_Size added in v0.9.0

func (m *GetClusterInfoRequest) XXX_Size() int

func (*GetClusterInfoRequest) XXX_Unmarshal added in v0.9.0

func (m *GetClusterInfoRequest) XXX_Unmarshal(b []byte) error

type GetClusterInfoResponse added in v0.9.0

type GetClusterInfoResponse struct {
	ChainID              []byte        `protobuf:"bytes,1,opt,name=chainID,proto3" json:"chainID,omitempty"`
	Error                string        `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	MbrAttrs             []*MemberAttr `protobuf:"bytes,3,rep,name=mbrAttrs,proto3" json:"mbrAttrs,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

func (*GetClusterInfoResponse) Descriptor added in v0.9.0

func (*GetClusterInfoResponse) Descriptor() ([]byte, []int)

func (*GetClusterInfoResponse) GetChainID added in v0.9.0

func (m *GetClusterInfoResponse) GetChainID() []byte

func (*GetClusterInfoResponse) GetError added in v0.9.0

func (m *GetClusterInfoResponse) GetError() string

func (*GetClusterInfoResponse) GetMbrAttrs added in v0.9.0

func (m *GetClusterInfoResponse) GetMbrAttrs() []*MemberAttr

func (*GetClusterInfoResponse) ProtoMessage added in v0.9.0

func (*GetClusterInfoResponse) ProtoMessage()

func (*GetClusterInfoResponse) Reset added in v0.9.0

func (m *GetClusterInfoResponse) Reset()

func (*GetClusterInfoResponse) String added in v0.9.0

func (m *GetClusterInfoResponse) String() string

func (*GetClusterInfoResponse) XXX_DiscardUnknown added in v0.9.0

func (m *GetClusterInfoResponse) XXX_DiscardUnknown()

func (*GetClusterInfoResponse) XXX_Marshal added in v0.9.0

func (m *GetClusterInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetClusterInfoResponse) XXX_Merge added in v0.9.0

func (m *GetClusterInfoResponse) XXX_Merge(src proto.Message)

func (*GetClusterInfoResponse) XXX_Size added in v0.9.0

func (m *GetClusterInfoResponse) XXX_Size() int

func (*GetClusterInfoResponse) XXX_Unmarshal added in v0.9.0

func (m *GetClusterInfoResponse) XXX_Unmarshal(b []byte) error

type GetHashByNo added in v0.8.1

type GetHashByNo struct {
	BlockNo              uint64   `protobuf:"varint,1,opt,name=blockNo,proto3" json:"blockNo,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetHashByNo) Descriptor added in v0.8.1

func (*GetHashByNo) Descriptor() ([]byte, []int)

func (*GetHashByNo) GetBlockNo added in v0.8.1

func (m *GetHashByNo) GetBlockNo() uint64

func (*GetHashByNo) ProtoMessage added in v0.8.1

func (*GetHashByNo) ProtoMessage()

func (*GetHashByNo) Reset added in v0.8.1

func (m *GetHashByNo) Reset()

func (*GetHashByNo) String added in v0.8.1

func (m *GetHashByNo) String() string

func (*GetHashByNo) XXX_DiscardUnknown added in v0.8.1

func (m *GetHashByNo) XXX_DiscardUnknown()

func (*GetHashByNo) XXX_Marshal added in v0.8.1

func (m *GetHashByNo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetHashByNo) XXX_Merge added in v0.8.1

func (m *GetHashByNo) XXX_Merge(src proto.Message)

func (*GetHashByNo) XXX_Size added in v0.8.1

func (m *GetHashByNo) XXX_Size() int

func (*GetHashByNo) XXX_Unmarshal added in v0.8.1

func (m *GetHashByNo) XXX_Unmarshal(b []byte) error

type GetHashByNoResponse added in v0.8.1

type GetHashByNoResponse struct {
	Status               ResultStatus `protobuf:"varint,1,opt,name=status,proto3,enum=types.ResultStatus" json:"status,omitempty"`
	BlockHash            []byte       `protobuf:"bytes,2,opt,name=blockHash,proto3" json:"blockHash,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*GetHashByNoResponse) Descriptor added in v0.8.1

func (*GetHashByNoResponse) Descriptor() ([]byte, []int)

func (*GetHashByNoResponse) GetBlockHash added in v0.8.1

func (m *GetHashByNoResponse) GetBlockHash() []byte

func (*GetHashByNoResponse) GetStatus added in v0.8.1

func (m *GetHashByNoResponse) GetStatus() ResultStatus

func (*GetHashByNoResponse) ProtoMessage added in v0.8.1

func (*GetHashByNoResponse) ProtoMessage()

func (*GetHashByNoResponse) Reset added in v0.8.1

func (m *GetHashByNoResponse) Reset()

func (*GetHashByNoResponse) String added in v0.8.1

func (m *GetHashByNoResponse) String() string

func (*GetHashByNoResponse) XXX_DiscardUnknown added in v0.8.1

func (m *GetHashByNoResponse) XXX_DiscardUnknown()

func (*GetHashByNoResponse) XXX_Marshal added in v0.8.1

func (m *GetHashByNoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetHashByNoResponse) XXX_Merge added in v0.8.1

func (m *GetHashByNoResponse) XXX_Merge(src proto.Message)

func (*GetHashByNoResponse) XXX_Size added in v0.8.1

func (m *GetHashByNoResponse) XXX_Size() int

func (*GetHashByNoResponse) XXX_Unmarshal added in v0.8.1

func (m *GetHashByNoResponse) XXX_Unmarshal(b []byte) error

type GetHashesRequest added in v0.8.1

type GetHashesRequest struct {
	// prevHash indicated referenced block hash. server will return hashes after this block.
	PrevHash []byte `protobuf:"bytes,1,opt,name=prevHash,proto3" json:"prevHash,omitempty"`
	// prevNumber indicated referenced block
	PrevNumber uint64 `protobuf:"varint,2,opt,name=prevNumber,proto3" json:"prevNumber,omitempty"`
	// maximum count of hashes that want to get
	Size                 uint64   `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

GetHashesRequest

func (*GetHashesRequest) Descriptor added in v0.8.1

func (*GetHashesRequest) Descriptor() ([]byte, []int)

func (*GetHashesRequest) GetPrevHash added in v0.8.1

func (m *GetHashesRequest) GetPrevHash() []byte

func (*GetHashesRequest) GetPrevNumber added in v0.8.1

func (m *GetHashesRequest) GetPrevNumber() uint64

func (*GetHashesRequest) GetSize added in v0.8.1

func (m *GetHashesRequest) GetSize() uint64

func (*GetHashesRequest) ProtoMessage added in v0.8.1

func (*GetHashesRequest) ProtoMessage()

func (*GetHashesRequest) Reset added in v0.8.1

func (m *GetHashesRequest) Reset()

func (*GetHashesRequest) String added in v0.8.1

func (m *GetHashesRequest) String() string

func (*GetHashesRequest) XXX_DiscardUnknown added in v0.8.1

func (m *GetHashesRequest) XXX_DiscardUnknown()

func (*GetHashesRequest) XXX_Marshal added in v0.8.1

func (m *GetHashesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetHashesRequest) XXX_Merge added in v0.8.1

func (m *GetHashesRequest) XXX_Merge(src proto.Message)

func (*GetHashesRequest) XXX_Size added in v0.8.1

func (m *GetHashesRequest) XXX_Size() int

func (*GetHashesRequest) XXX_Unmarshal added in v0.8.1

func (m *GetHashesRequest) XXX_Unmarshal(b []byte) error

type GetHashesResponse added in v0.8.1

type GetHashesResponse struct {
	Status               ResultStatus `protobuf:"varint,1,opt,name=status,proto3,enum=types.ResultStatus" json:"status,omitempty"`
	Hashes               [][]byte     `protobuf:"bytes,2,rep,name=hashes,proto3" json:"hashes,omitempty"`
	HasNext              bool         `protobuf:"varint,3,opt,name=hasNext,proto3" json:"hasNext,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

GetHashesResponse contains response of GetHashesRequest.

func (*GetHashesResponse) Descriptor added in v0.8.1

func (*GetHashesResponse) Descriptor() ([]byte, []int)

func (*GetHashesResponse) GetHasNext added in v0.8.1

func (m *GetHashesResponse) GetHasNext() bool

func (*GetHashesResponse) GetHashes added in v0.8.1

func (m *GetHashesResponse) GetHashes() [][]byte

func (*GetHashesResponse) GetStatus added in v0.8.1

func (m *GetHashesResponse) GetStatus() ResultStatus

func (*GetHashesResponse) ProtoMessage added in v0.8.1

func (*GetHashesResponse) ProtoMessage()

func (*GetHashesResponse) Reset added in v0.8.1

func (m *GetHashesResponse) Reset()

func (*GetHashesResponse) String added in v0.8.1

func (m *GetHashesResponse) String() string

func (*GetHashesResponse) XXX_DiscardUnknown added in v0.8.1

func (m *GetHashesResponse) XXX_DiscardUnknown()

func (*GetHashesResponse) XXX_Marshal added in v0.8.1

func (m *GetHashesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetHashesResponse) XXX_Merge added in v0.8.1

func (m *GetHashesResponse) XXX_Merge(src proto.Message)

func (*GetHashesResponse) XXX_Size added in v0.8.1

func (m *GetHashesResponse) XXX_Size() int

func (*GetHashesResponse) XXX_Unmarshal added in v0.8.1

func (m *GetHashesResponse) XXX_Unmarshal(b []byte) error

type GetMissingRequest

type GetMissingRequest struct {
	// Hash indicated referenced sparse block hash array of longest chain(caller).
	Hashes [][]byte `protobuf:"bytes,1,rep,name=hashes,proto3" json:"hashes,omitempty"`
	// stophash will be used the meaning of end point of missing part.
	Stophash             []byte   `protobuf:"bytes,2,opt,name=stophash,proto3" json:"stophash,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

GetMissingRequest

func (*GetMissingRequest) Descriptor

func (*GetMissingRequest) Descriptor() ([]byte, []int)

func (*GetMissingRequest) GetHashes

func (m *GetMissingRequest) GetHashes() [][]byte

func (*GetMissingRequest) GetStophash

func (m *GetMissingRequest) GetStophash() []byte

func (*GetMissingRequest) ProtoMessage

func (*GetMissingRequest) ProtoMessage()

func (*GetMissingRequest) Reset

func (m *GetMissingRequest) Reset()

func (*GetMissingRequest) String

func (m *GetMissingRequest) String() string

func (*GetMissingRequest) XXX_DiscardUnknown

func (m *GetMissingRequest) XXX_DiscardUnknown()

func (*GetMissingRequest) XXX_Marshal

func (m *GetMissingRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetMissingRequest) XXX_Merge

func (m *GetMissingRequest) XXX_Merge(src proto.Message)

func (*GetMissingRequest) XXX_Size

func (m *GetMissingRequest) XXX_Size() int

func (*GetMissingRequest) XXX_Unmarshal

func (m *GetMissingRequest) XXX_Unmarshal(b []byte) error

type GetTransactionsRequest

type GetTransactionsRequest struct {
	Hashes               [][]byte `protobuf:"bytes,1,rep,name=hashes,proto3" json:"hashes,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetTransactionsRequest) Descriptor

func (*GetTransactionsRequest) Descriptor() ([]byte, []int)

func (*GetTransactionsRequest) GetHashes

func (m *GetTransactionsRequest) GetHashes() [][]byte

func (*GetTransactionsRequest) ProtoMessage

func (*GetTransactionsRequest) ProtoMessage()

func (*GetTransactionsRequest) Reset

func (m *GetTransactionsRequest) Reset()

func (*GetTransactionsRequest) String

func (m *GetTransactionsRequest) String() string

func (*GetTransactionsRequest) XXX_DiscardUnknown

func (m *GetTransactionsRequest) XXX_DiscardUnknown()

func (*GetTransactionsRequest) XXX_Marshal

func (m *GetTransactionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetTransactionsRequest) XXX_Merge

func (m *GetTransactionsRequest) XXX_Merge(src proto.Message)

func (*GetTransactionsRequest) XXX_Size

func (m *GetTransactionsRequest) XXX_Size() int

func (*GetTransactionsRequest) XXX_Unmarshal

func (m *GetTransactionsRequest) XXX_Unmarshal(b []byte) error

type GetTransactionsResponse

type GetTransactionsResponse struct {
	Status               ResultStatus `protobuf:"varint,1,opt,name=status,proto3,enum=types.ResultStatus" json:"status,omitempty"`
	Hashes               [][]byte     `protobuf:"bytes,2,rep,name=hashes,proto3" json:"hashes,omitempty"`
	Txs                  []*Tx        `protobuf:"bytes,3,rep,name=txs,proto3" json:"txs,omitempty"`
	HasNext              bool         `protobuf:"varint,4,opt,name=hasNext,proto3" json:"hasNext,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*GetTransactionsResponse) Descriptor

func (*GetTransactionsResponse) Descriptor() ([]byte, []int)

func (*GetTransactionsResponse) GetHasNext

func (m *GetTransactionsResponse) GetHasNext() bool

func (*GetTransactionsResponse) GetHashes

func (m *GetTransactionsResponse) GetHashes() [][]byte

func (*GetTransactionsResponse) GetStatus

func (m *GetTransactionsResponse) GetStatus() ResultStatus

func (*GetTransactionsResponse) GetTxs

func (m *GetTransactionsResponse) GetTxs() []*Tx

func (*GetTransactionsResponse) ProtoMessage

func (*GetTransactionsResponse) ProtoMessage()

func (*GetTransactionsResponse) Reset

func (m *GetTransactionsResponse) Reset()

func (*GetTransactionsResponse) String

func (m *GetTransactionsResponse) String() string

func (*GetTransactionsResponse) XXX_DiscardUnknown

func (m *GetTransactionsResponse) XXX_DiscardUnknown()

func (*GetTransactionsResponse) XXX_Marshal

func (m *GetTransactionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetTransactionsResponse) XXX_Merge

func (m *GetTransactionsResponse) XXX_Merge(src proto.Message)

func (*GetTransactionsResponse) XXX_Size

func (m *GetTransactionsResponse) XXX_Size() int

func (*GetTransactionsResponse) XXX_Unmarshal

func (m *GetTransactionsResponse) XXX_Unmarshal(b []byte) error

type GoAwayNotice

type GoAwayNotice struct {
	Message              string   `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

GoAwayNotice is sent before host peer is closing connection to remote peer. it contains why the host closing connection.

func (*GoAwayNotice) Descriptor

func (*GoAwayNotice) Descriptor() ([]byte, []int)

func (*GoAwayNotice) GetMessage

func (m *GoAwayNotice) GetMessage() string

func (*GoAwayNotice) ProtoMessage

func (*GoAwayNotice) ProtoMessage()

func (*GoAwayNotice) Reset

func (m *GoAwayNotice) Reset()

func (*GoAwayNotice) String

func (m *GoAwayNotice) String() string

func (*GoAwayNotice) XXX_DiscardUnknown

func (m *GoAwayNotice) XXX_DiscardUnknown()

func (*GoAwayNotice) XXX_Marshal

func (m *GoAwayNotice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GoAwayNotice) XXX_Merge

func (m *GoAwayNotice) XXX_Merge(src proto.Message)

func (*GoAwayNotice) XXX_Size

func (m *GoAwayNotice) XXX_Size() int

func (*GoAwayNotice) XXX_Unmarshal

func (m *GoAwayNotice) XXX_Unmarshal(b []byte) error

type HashID

type HashID [HashIDLength]byte

HashID is a fixed size bytes

func GetHashID

func GetHashID(bytes ...[]byte) HashID

GetHashID make a HashID from hash of bytes

func ToHashID

func ToHashID(hash []byte) HashID

ToHashID make a HashID from bytes

func (HashID) Bytes

func (id HashID) Bytes() []byte

Bytes make a byte slice from id

func (HashID) Compare

func (id HashID) Compare(alt HashID) int

Compare returns an integer comparing two HashIDs as byte slices.

func (HashID) Equal

func (id HashID) Equal(alt HashID) bool

Equal returns a boolean comparing two HashIDs as byte slices.

func (HashID) String

func (id HashID) String() string

type HostAccessor added in v0.9.0

type HostAccessor interface {
	// Version return version of this server
	Version() string

	// StartTime is the time when server was booted
	StartTime() time.Time
}

HostAccessor is interface to provide the informations about server

type ImplHashBytes added in v0.8.2

type ImplHashBytes interface {
	Hash() []byte
}

ImplHashBytes is a object supports Hash

type ImplHashID

type ImplHashID interface {
	HashID() HashID
}

ImplHashID is a object has HashID

type ImplMarshal added in v0.8.1

type ImplMarshal interface {
	Marshal() ([]byte, error)
}

ImplMarshal is a object has marshal interface

type ImportFormat

type ImportFormat struct {
	Wif                  *SingleBytes `protobuf:"bytes,1,opt,name=wif,proto3" json:"wif,omitempty"`
	Oldpass              string       `protobuf:"bytes,2,opt,name=oldpass,proto3" json:"oldpass,omitempty"`
	Newpass              string       `protobuf:"bytes,3,opt,name=newpass,proto3" json:"newpass,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*ImportFormat) Descriptor

func (*ImportFormat) Descriptor() ([]byte, []int)

func (*ImportFormat) GetNewpass

func (m *ImportFormat) GetNewpass() string

func (*ImportFormat) GetOldpass

func (m *ImportFormat) GetOldpass() string

func (*ImportFormat) GetWif

func (m *ImportFormat) GetWif() *SingleBytes

func (*ImportFormat) ProtoMessage

func (*ImportFormat) ProtoMessage()

func (*ImportFormat) Reset

func (m *ImportFormat) Reset()

func (*ImportFormat) String

func (m *ImportFormat) String() string

func (*ImportFormat) XXX_DiscardUnknown

func (m *ImportFormat) XXX_DiscardUnknown()

func (*ImportFormat) XXX_Marshal

func (m *ImportFormat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ImportFormat) XXX_Merge

func (m *ImportFormat) XXX_Merge(src proto.Message)

func (*ImportFormat) XXX_Size

func (m *ImportFormat) XXX_Size() int

func (*ImportFormat) XXX_Unmarshal

func (m *ImportFormat) XXX_Unmarshal(b []byte) error

type Input

type Input struct {
	Hash                 []byte   `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	Address              [][]byte `protobuf:"bytes,2,rep,name=address,proto3" json:"address,omitempty"`
	Value                []byte   `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	Script               []byte   `protobuf:"bytes,4,opt,name=script,proto3" json:"script,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Input) Descriptor

func (*Input) Descriptor() ([]byte, []int)

func (*Input) GetAddress

func (m *Input) GetAddress() [][]byte

func (*Input) GetHash

func (m *Input) GetHash() []byte

func (*Input) GetScript

func (m *Input) GetScript() []byte

func (*Input) GetValue

func (m *Input) GetValue() []byte

func (*Input) ProtoMessage

func (*Input) ProtoMessage()

func (*Input) Reset

func (m *Input) Reset()

func (*Input) String

func (m *Input) String() string

func (*Input) XXX_DiscardUnknown

func (m *Input) XXX_DiscardUnknown()

func (*Input) XXX_Marshal

func (m *Input) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Input) XXX_Merge

func (m *Input) XXX_Merge(src proto.Message)

func (*Input) XXX_Size

func (m *Input) XXX_Size() int

func (*Input) XXX_Unmarshal

func (m *Input) XXX_Unmarshal(b []byte) error

type KeyParams added in v0.9.0

type KeyParams struct {
	Key                  []string `protobuf:"bytes,1,rep,name=key,proto3" json:"key,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*KeyParams) Descriptor added in v0.9.0

func (*KeyParams) Descriptor() ([]byte, []int)

func (*KeyParams) GetKey added in v0.9.0

func (m *KeyParams) GetKey() []string

func (*KeyParams) ProtoMessage added in v0.9.0

func (*KeyParams) ProtoMessage()

func (*KeyParams) Reset added in v0.9.0

func (m *KeyParams) Reset()

func (*KeyParams) String added in v0.9.0

func (m *KeyParams) String() string

func (*KeyParams) XXX_DiscardUnknown added in v0.9.0

func (m *KeyParams) XXX_DiscardUnknown()

func (*KeyParams) XXX_Marshal added in v0.9.0

func (m *KeyParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*KeyParams) XXX_Merge added in v0.9.0

func (m *KeyParams) XXX_Merge(src proto.Message)

func (*KeyParams) XXX_Size added in v0.9.0

func (m *KeyParams) XXX_Size() int

func (*KeyParams) XXX_Unmarshal added in v0.9.0

func (m *KeyParams) XXX_Unmarshal(b []byte) error

type LastBlockStatus added in v0.9.0

type LastBlockStatus struct {
	CheckTime   time.Time
	BlockHash   []byte
	BlockNumber uint64
}

LastBlockStatus i

type ListParams

type ListParams struct {
	Hash                 []byte   `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	Height               uint64   `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
	Size                 uint32   `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
	Offset               uint32   `protobuf:"varint,4,opt,name=offset,proto3" json:"offset,omitempty"`
	Asc                  bool     `protobuf:"varint,5,opt,name=asc,proto3" json:"asc,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ListParams) Descriptor

func (*ListParams) Descriptor() ([]byte, []int)

func (*ListParams) GetAsc

func (m *ListParams) GetAsc() bool

func (*ListParams) GetHash

func (m *ListParams) GetHash() []byte

func (*ListParams) GetHeight

func (m *ListParams) GetHeight() uint64

func (*ListParams) GetOffset

func (m *ListParams) GetOffset() uint32

func (*ListParams) GetSize

func (m *ListParams) GetSize() uint32

func (*ListParams) ProtoMessage

func (*ListParams) ProtoMessage()

func (*ListParams) Reset

func (m *ListParams) Reset()

func (*ListParams) String

func (m *ListParams) String() string

func (*ListParams) XXX_DiscardUnknown

func (m *ListParams) XXX_DiscardUnknown()

func (*ListParams) XXX_Marshal

func (m *ListParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListParams) XXX_Merge

func (m *ListParams) XXX_Merge(src proto.Message)

func (*ListParams) XXX_Size

func (m *ListParams) XXX_Size() int

func (*ListParams) XXX_Unmarshal

func (m *ListParams) XXX_Unmarshal(b []byte) error

type MapQuery added in v0.9.0

type MapQuery struct {
	Status               *Status  `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	AddMe                bool     `protobuf:"varint,2,opt,name=addMe,proto3" json:"addMe,omitempty"`
	Size                 int32    `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
	Excludes             [][]byte `protobuf:"bytes,4,rep,name=excludes,proto3" json:"excludes,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

query to polaris

func (*MapQuery) Descriptor added in v0.9.0

func (*MapQuery) Descriptor() ([]byte, []int)

func (*MapQuery) GetAddMe added in v0.9.0

func (m *MapQuery) GetAddMe() bool

func (*MapQuery) GetExcludes added in v0.9.0

func (m *MapQuery) GetExcludes() [][]byte

func (*MapQuery) GetSize added in v0.9.0

func (m *MapQuery) GetSize() int32

func (*MapQuery) GetStatus added in v0.9.0

func (m *MapQuery) GetStatus() *Status

func (*MapQuery) ProtoMessage added in v0.9.0

func (*MapQuery) ProtoMessage()

func (*MapQuery) Reset added in v0.9.0

func (m *MapQuery) Reset()

func (*MapQuery) String added in v0.9.0

func (m *MapQuery) String() string

func (*MapQuery) XXX_DiscardUnknown added in v0.9.0

func (m *MapQuery) XXX_DiscardUnknown()

func (*MapQuery) XXX_Marshal added in v0.9.0

func (m *MapQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MapQuery) XXX_Merge added in v0.9.0

func (m *MapQuery) XXX_Merge(src proto.Message)

func (*MapQuery) XXX_Size added in v0.9.0

func (m *MapQuery) XXX_Size() int

func (*MapQuery) XXX_Unmarshal added in v0.9.0

func (m *MapQuery) XXX_Unmarshal(b []byte) error

type MapResponse added in v0.9.0

type MapResponse struct {
	Status               ResultStatus   `protobuf:"varint,1,opt,name=status,proto3,enum=types.ResultStatus" json:"status,omitempty"`
	Addresses            []*PeerAddress `protobuf:"bytes,2,rep,name=addresses,proto3" json:"addresses,omitempty"`
	Message              string         `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

func (*MapResponse) Descriptor added in v0.9.0

func (*MapResponse) Descriptor() ([]byte, []int)

func (*MapResponse) GetAddresses added in v0.9.0

func (m *MapResponse) GetAddresses() []*PeerAddress

func (*MapResponse) GetMessage added in v0.9.0

func (m *MapResponse) GetMessage() string

func (*MapResponse) GetStatus added in v0.9.0

func (m *MapResponse) GetStatus() ResultStatus

func (*MapResponse) ProtoMessage added in v0.9.0

func (*MapResponse) ProtoMessage()

func (*MapResponse) Reset added in v0.9.0

func (m *MapResponse) Reset()

func (*MapResponse) String added in v0.9.0

func (m *MapResponse) String() string

func (*MapResponse) XXX_DiscardUnknown added in v0.9.0

func (m *MapResponse) XXX_DiscardUnknown()

func (*MapResponse) XXX_Marshal added in v0.9.0

func (m *MapResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MapResponse) XXX_Merge added in v0.9.0

func (m *MapResponse) XXX_Merge(src proto.Message)

func (*MapResponse) XXX_Size added in v0.9.0

func (m *MapResponse) XXX_Size() int

func (*MapResponse) XXX_Unmarshal added in v0.9.0

func (m *MapResponse) XXX_Unmarshal(b []byte) error

type MemberAttr added in v0.9.0

type MemberAttr struct {
	ID                   uint64   `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Name                 string   `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Url                  string   `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"`
	PeerID               []byte   `protobuf:"bytes,4,opt,name=peerID,proto3" json:"peerID,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*MemberAttr) Descriptor added in v0.9.0

func (*MemberAttr) Descriptor() ([]byte, []int)

func (*MemberAttr) GetID added in v0.9.0

func (m *MemberAttr) GetID() uint64

func (*MemberAttr) GetName added in v0.9.0

func (m *MemberAttr) GetName() string

func (*MemberAttr) GetPeerID added in v0.9.0

func (m *MemberAttr) GetPeerID() []byte

func (*MemberAttr) GetUrl added in v0.9.0

func (m *MemberAttr) GetUrl() string

func (*MemberAttr) ProtoMessage added in v0.9.0

func (*MemberAttr) ProtoMessage()

func (*MemberAttr) Reset added in v0.9.0

func (m *MemberAttr) Reset()

func (*MemberAttr) String added in v0.9.0

func (m *MemberAttr) String() string

func (*MemberAttr) ToString added in v0.9.0

func (mattr *MemberAttr) ToString() string

func (*MemberAttr) XXX_DiscardUnknown added in v0.9.0

func (m *MemberAttr) XXX_DiscardUnknown()

func (*MemberAttr) XXX_Marshal added in v0.9.0

func (m *MemberAttr) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MemberAttr) XXX_Merge added in v0.9.0

func (m *MemberAttr) XXX_Merge(src proto.Message)

func (*MemberAttr) XXX_Size added in v0.9.0

func (m *MemberAttr) XXX_Size() int

func (*MemberAttr) XXX_Unmarshal added in v0.9.0

func (m *MemberAttr) XXX_Unmarshal(b []byte) error

type MembershipChange added in v0.9.0

type MembershipChange struct {
	Type                 MembershipChangeType `protobuf:"varint,1,opt,name=type,proto3,enum=types.MembershipChangeType" json:"type,omitempty"`
	Attr                 *MemberAttr          `protobuf:"bytes,2,opt,name=attr,proto3" json:"attr,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*MembershipChange) Descriptor added in v0.9.0

func (*MembershipChange) Descriptor() ([]byte, []int)

func (*MembershipChange) GetAttr added in v0.9.0

func (m *MembershipChange) GetAttr() *MemberAttr

func (*MembershipChange) GetType added in v0.9.0

func (*MembershipChange) ProtoMessage added in v0.9.0

func (*MembershipChange) ProtoMessage()

func (*MembershipChange) Reset added in v0.9.0

func (m *MembershipChange) Reset()

func (*MembershipChange) String added in v0.9.0

func (m *MembershipChange) String() string

func (*MembershipChange) ToString added in v0.9.0

func (mc *MembershipChange) ToString() string

func (*MembershipChange) XXX_DiscardUnknown added in v0.9.0

func (m *MembershipChange) XXX_DiscardUnknown()

func (*MembershipChange) XXX_Marshal added in v0.9.0

func (m *MembershipChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MembershipChange) XXX_Merge added in v0.9.0

func (m *MembershipChange) XXX_Merge(src proto.Message)

func (*MembershipChange) XXX_Size added in v0.9.0

func (m *MembershipChange) XXX_Size() int

func (*MembershipChange) XXX_Unmarshal added in v0.9.0

func (m *MembershipChange) XXX_Unmarshal(b []byte) error

type MembershipChangeReply added in v0.9.0

type MembershipChangeReply struct {
	Attr                 *MemberAttr `protobuf:"bytes,1,opt,name=attr,proto3" json:"attr,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (*MembershipChangeReply) Descriptor added in v0.9.0

func (*MembershipChangeReply) Descriptor() ([]byte, []int)

func (*MembershipChangeReply) GetAttr added in v0.9.0

func (m *MembershipChangeReply) GetAttr() *MemberAttr

func (*MembershipChangeReply) ProtoMessage added in v0.9.0

func (*MembershipChangeReply) ProtoMessage()

func (*MembershipChangeReply) Reset added in v0.9.0

func (m *MembershipChangeReply) Reset()

func (*MembershipChangeReply) String added in v0.9.0

func (m *MembershipChangeReply) String() string

func (*MembershipChangeReply) XXX_DiscardUnknown added in v0.9.0

func (m *MembershipChangeReply) XXX_DiscardUnknown()

func (*MembershipChangeReply) XXX_Marshal added in v0.9.0

func (m *MembershipChangeReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MembershipChangeReply) XXX_Merge added in v0.9.0

func (m *MembershipChangeReply) XXX_Merge(src proto.Message)

func (*MembershipChangeReply) XXX_Size added in v0.9.0

func (m *MembershipChangeReply) XXX_Size() int

func (*MembershipChangeReply) XXX_Unmarshal added in v0.9.0

func (m *MembershipChangeReply) XXX_Unmarshal(b []byte) error

type MembershipChangeType added in v0.9.0

type MembershipChangeType int32

cluster member for raft consensus

const (
	MembershipChangeType_ADD_MEMBER    MembershipChangeType = 0
	MembershipChangeType_REMOVE_MEMBER MembershipChangeType = 1
)

func (MembershipChangeType) EnumDescriptor added in v0.9.0

func (MembershipChangeType) EnumDescriptor() ([]byte, []int)

func (MembershipChangeType) String added in v0.9.0

func (x MembershipChangeType) String() string

type MetricType added in v0.8.2

type MetricType int32
const (
	// NOTHING should not be used.
	MetricType_NOTHING MetricType = 0
	// Metric for p2p network transfer
	MetricType_P2P_NETWORK MetricType = 1
)

func (MetricType) EnumDescriptor added in v0.8.2

func (MetricType) EnumDescriptor() ([]byte, []int)

func (MetricType) String added in v0.8.2

func (x MetricType) String() string

type Metrics added in v0.8.2

type Metrics struct {
	Peers                []*PeerMetric `protobuf:"bytes,1,rep,name=peers,proto3" json:"peers,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

func (*Metrics) Descriptor added in v0.8.2

func (*Metrics) Descriptor() ([]byte, []int)

func (*Metrics) GetPeers added in v0.8.2

func (m *Metrics) GetPeers() []*PeerMetric

func (*Metrics) ProtoMessage added in v0.8.2

func (*Metrics) ProtoMessage()

func (*Metrics) Reset added in v0.8.2

func (m *Metrics) Reset()

func (*Metrics) String added in v0.8.2

func (m *Metrics) String() string

func (*Metrics) XXX_DiscardUnknown added in v0.8.2

func (m *Metrics) XXX_DiscardUnknown()

func (*Metrics) XXX_Marshal added in v0.8.2

func (m *Metrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Metrics) XXX_Merge added in v0.8.2

func (m *Metrics) XXX_Merge(src proto.Message)

func (*Metrics) XXX_Size added in v0.8.2

func (m *Metrics) XXX_Size() int

func (*Metrics) XXX_Unmarshal added in v0.8.2

func (m *Metrics) XXX_Unmarshal(b []byte) error

type MetricsRequest added in v0.8.2

type MetricsRequest struct {
	Types                []MetricType `protobuf:"varint,1,rep,packed,name=types,proto3,enum=types.MetricType" json:"types,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*MetricsRequest) Descriptor added in v0.8.2

func (*MetricsRequest) Descriptor() ([]byte, []int)

func (*MetricsRequest) GetTypes added in v0.8.2

func (m *MetricsRequest) GetTypes() []MetricType

func (*MetricsRequest) ProtoMessage added in v0.8.2

func (*MetricsRequest) ProtoMessage()

func (*MetricsRequest) Reset added in v0.8.2

func (m *MetricsRequest) Reset()

func (*MetricsRequest) String added in v0.8.2

func (m *MetricsRequest) String() string

func (*MetricsRequest) XXX_DiscardUnknown added in v0.8.2

func (m *MetricsRequest) XXX_DiscardUnknown()

func (*MetricsRequest) XXX_Marshal added in v0.8.2

func (m *MetricsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MetricsRequest) XXX_Merge added in v0.8.2

func (m *MetricsRequest) XXX_Merge(src proto.Message)

func (*MetricsRequest) XXX_Size added in v0.8.2

func (m *MetricsRequest) XXX_Size() int

func (*MetricsRequest) XXX_Unmarshal added in v0.8.2

func (m *MetricsRequest) XXX_Unmarshal(b []byte) error

type MovingAverage added in v0.9.0

type MovingAverage struct {
	// contains filtered or unexported fields
}

func NewMovingAverage added in v0.9.0

func NewMovingAverage(size int) *MovingAverage

func (*MovingAverage) Add added in v0.9.0

func (ma *MovingAverage) Add(val int64) int64

type MsgHeader

type MsgHeader struct {
	// Deprecated client version.
	ClientVersion string `protobuf:"bytes,1,opt,name=clientVersion,proto3" json:"clientVersion,omitempty"`
	// unix time
	Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// allows requesters to use request data when processing a response
	Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
	// Gossip is flag to have receiver peer gossip the message to neighbors
	// Deprecated whether to gossip other peers is determined by subprotocol since version 0.3.0 .
	Gossip bool `protobuf:"varint,4,opt,name=gossip,proto3" json:"gossip,omitempty"`
	// PeerID is id of node that created the message (not the peer that may have sent it). =base58(mh(sha256(nodePubKey)))
	PeerID []byte `protobuf:"bytes,5,opt,name=peerID,proto3" json:"peerID,omitempty"`
	// nodePubKey Authoring node Secp256k1 public key (32bytes) - protobufs serielized
	NodePubKey []byte `protobuf:"bytes,6,opt,name=nodePubKey,proto3" json:"nodePubKey,omitempty"`
	// signature of message data + method specific data by message authoring node. format: string([]bytes)
	Sign []byte `protobuf:"bytes,7,opt,name=sign,proto3" json:"sign,omitempty"`
	// sub category of message. the receiving peer determines how to deserialize payload data and whether to spread messages to other peers
	Subprotocol uint32 `protobuf:"varint,8,opt,name=subprotocol,proto3" json:"subprotocol,omitempty"`
	// size of bytes of the payload
	Length               uint32   `protobuf:"varint,9,opt,name=length,proto3" json:"length,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

MsgHeader contains common properties of all p2p messages

func (*MsgHeader) Descriptor

func (*MsgHeader) Descriptor() ([]byte, []int)

func (*MsgHeader) GetClientVersion

func (m *MsgHeader) GetClientVersion() string

func (*MsgHeader) GetGossip

func (m *MsgHeader) GetGossip() bool

func (*MsgHeader) GetId

func (m *MsgHeader) GetId() string

func (*MsgHeader) GetLength

func (m *MsgHeader) GetLength() uint32

func (*MsgHeader) GetNodePubKey

func (m *MsgHeader) GetNodePubKey() []byte

func (*MsgHeader) GetPeerID

func (m *MsgHeader) GetPeerID() []byte

func (*MsgHeader) GetSign

func (m *MsgHeader) GetSign() []byte

func (*MsgHeader) GetSubprotocol

func (m *MsgHeader) GetSubprotocol() uint32

func (*MsgHeader) GetTimestamp

func (m *MsgHeader) GetTimestamp() int64

func (*MsgHeader) ProtoMessage

func (*MsgHeader) ProtoMessage()

func (*MsgHeader) Reset

func (m *MsgHeader) Reset()

func (*MsgHeader) String

func (m *MsgHeader) String() string

func (*MsgHeader) XXX_DiscardUnknown

func (m *MsgHeader) XXX_DiscardUnknown()

func (*MsgHeader) XXX_Marshal

func (m *MsgHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgHeader) XXX_Merge

func (m *MsgHeader) XXX_Merge(src proto.Message)

func (*MsgHeader) XXX_Size

func (m *MsgHeader) XXX_Size() int

func (*MsgHeader) XXX_Unmarshal

func (m *MsgHeader) XXX_Unmarshal(b []byte) error

type Name added in v0.9.0

type Name struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	BlockNo              uint64   `protobuf:"varint,2,opt,name=blockNo,proto3" json:"blockNo,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Name) Descriptor added in v0.9.0

func (*Name) Descriptor() ([]byte, []int)

func (*Name) GetBlockNo added in v0.9.0

func (m *Name) GetBlockNo() uint64

func (*Name) GetName added in v0.9.0

func (m *Name) GetName() string

func (*Name) ProtoMessage added in v0.9.0

func (*Name) ProtoMessage()

func (*Name) Reset added in v0.9.0

func (m *Name) Reset()

func (*Name) String added in v0.9.0

func (m *Name) String() string

func (*Name) XXX_DiscardUnknown added in v0.9.0

func (m *Name) XXX_DiscardUnknown()

func (*Name) XXX_Marshal added in v0.9.0

func (m *Name) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Name) XXX_Merge added in v0.9.0

func (m *Name) XXX_Merge(src proto.Message)

func (*Name) XXX_Size added in v0.9.0

func (m *Name) XXX_Size() int

func (*Name) XXX_Unmarshal added in v0.9.0

func (m *Name) XXX_Unmarshal(b []byte) error

type NameInfo added in v0.9.0

type NameInfo struct {
	Name                 *Name    `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Owner                []byte   `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"`
	Destination          []byte   `protobuf:"bytes,3,opt,name=destination,proto3" json:"destination,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*NameInfo) Descriptor added in v0.9.0

func (*NameInfo) Descriptor() ([]byte, []int)

func (*NameInfo) GetDestination added in v0.9.0

func (m *NameInfo) GetDestination() []byte

func (*NameInfo) GetName added in v0.9.0

func (m *NameInfo) GetName() *Name

func (*NameInfo) GetOwner added in v0.9.0

func (m *NameInfo) GetOwner() []byte

func (*NameInfo) ProtoMessage added in v0.9.0

func (*NameInfo) ProtoMessage()

func (*NameInfo) Reset added in v0.9.0

func (m *NameInfo) Reset()

func (*NameInfo) String added in v0.9.0

func (m *NameInfo) String() string

func (*NameInfo) XXX_DiscardUnknown added in v0.9.0

func (m *NameInfo) XXX_DiscardUnknown()

func (*NameInfo) XXX_Marshal added in v0.9.0

func (m *NameInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NameInfo) XXX_Merge added in v0.9.0

func (m *NameInfo) XXX_Merge(src proto.Message)

func (*NameInfo) XXX_Size added in v0.9.0

func (m *NameInfo) XXX_Size() int

func (*NameInfo) XXX_Unmarshal added in v0.9.0

func (m *NameInfo) XXX_Unmarshal(b []byte) error

type NewBlockNotice

type NewBlockNotice struct {
	BlockHash            []byte   `protobuf:"bytes,1,opt,name=blockHash,proto3" json:"blockHash,omitempty"`
	BlockNo              uint64   `protobuf:"varint,2,opt,name=blockNo,proto3" json:"blockNo,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

NewBlockNotice is sent to other peers when host node add a block, which is not produced by this host peer (i.e. added block that other bp node produced.) It contains just hash and blockNo. The host node will not send notice if target receiving peer knows that block already at best effort.

func (*NewBlockNotice) Descriptor

func (*NewBlockNotice) Descriptor() ([]byte, []int)

func (*NewBlockNotice) GetBlockHash

func (m *NewBlockNotice) GetBlockHash() []byte

func (*NewBlockNotice) GetBlockNo

func (m *NewBlockNotice) GetBlockNo() uint64

func (*NewBlockNotice) ProtoMessage

func (*NewBlockNotice) ProtoMessage()

func (*NewBlockNotice) Reset

func (m *NewBlockNotice) Reset()

func (*NewBlockNotice) String

func (m *NewBlockNotice) String() string

func (*NewBlockNotice) XXX_DiscardUnknown

func (m *NewBlockNotice) XXX_DiscardUnknown()

func (*NewBlockNotice) XXX_Marshal

func (m *NewBlockNotice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NewBlockNotice) XXX_Merge

func (m *NewBlockNotice) XXX_Merge(src proto.Message)

func (*NewBlockNotice) XXX_Size

func (m *NewBlockNotice) XXX_Size() int

func (*NewBlockNotice) XXX_Unmarshal

func (m *NewBlockNotice) XXX_Unmarshal(b []byte) error

type NewTransactionsNotice

type NewTransactionsNotice struct {
	TxHashes             [][]byte `protobuf:"bytes,1,rep,name=txHashes,proto3" json:"txHashes,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*NewTransactionsNotice) Descriptor

func (*NewTransactionsNotice) Descriptor() ([]byte, []int)

func (*NewTransactionsNotice) GetTxHashes

func (m *NewTransactionsNotice) GetTxHashes() [][]byte

func (*NewTransactionsNotice) ProtoMessage

func (*NewTransactionsNotice) ProtoMessage()

func (*NewTransactionsNotice) Reset

func (m *NewTransactionsNotice) Reset()

func (*NewTransactionsNotice) String

func (m *NewTransactionsNotice) String() string

func (*NewTransactionsNotice) XXX_DiscardUnknown

func (m *NewTransactionsNotice) XXX_DiscardUnknown()

func (*NewTransactionsNotice) XXX_Marshal

func (m *NewTransactionsNotice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NewTransactionsNotice) XXX_Merge

func (m *NewTransactionsNotice) XXX_Merge(src proto.Message)

func (*NewTransactionsNotice) XXX_Size

func (m *NewTransactionsNotice) XXX_Size() int

func (*NewTransactionsNotice) XXX_Unmarshal

func (m *NewTransactionsNotice) XXX_Unmarshal(b []byte) error

type NodeReq added in v0.8.3

type NodeReq struct {
	Timeout              []byte   `protobuf:"bytes,1,opt,name=timeout,proto3" json:"timeout,omitempty"`
	Component            []byte   `protobuf:"bytes,2,opt,name=component,proto3" json:"component,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*NodeReq) Descriptor added in v0.8.3

func (*NodeReq) Descriptor() ([]byte, []int)

func (*NodeReq) GetComponent added in v0.8.3

func (m *NodeReq) GetComponent() []byte

func (*NodeReq) GetTimeout added in v0.8.3

func (m *NodeReq) GetTimeout() []byte

func (*NodeReq) ProtoMessage added in v0.8.3

func (*NodeReq) ProtoMessage()

func (*NodeReq) Reset added in v0.8.3

func (m *NodeReq) Reset()

func (*NodeReq) String added in v0.8.3

func (m *NodeReq) String() string

func (*NodeReq) XXX_DiscardUnknown added in v0.8.3

func (m *NodeReq) XXX_DiscardUnknown()

func (*NodeReq) XXX_Marshal added in v0.8.3

func (m *NodeReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NodeReq) XXX_Merge added in v0.8.3

func (m *NodeReq) XXX_Merge(src proto.Message)

func (*NodeReq) XXX_Size added in v0.8.3

func (m *NodeReq) XXX_Size() int

func (*NodeReq) XXX_Unmarshal added in v0.8.3

func (m *NodeReq) XXX_Unmarshal(b []byte) error

type Output

type Output struct {
	Index                uint32   `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
	Address              []byte   `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	Value                []byte   `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	Script               []byte   `protobuf:"bytes,4,opt,name=script,proto3" json:"script,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Output) Descriptor

func (*Output) Descriptor() ([]byte, []int)

func (*Output) GetAddress

func (m *Output) GetAddress() []byte

func (*Output) GetIndex

func (m *Output) GetIndex() uint32

func (*Output) GetScript

func (m *Output) GetScript() []byte

func (*Output) GetValue

func (m *Output) GetValue() []byte

func (*Output) ProtoMessage

func (*Output) ProtoMessage()

func (*Output) Reset

func (m *Output) Reset()

func (*Output) String

func (m *Output) String() string

func (*Output) XXX_DiscardUnknown

func (m *Output) XXX_DiscardUnknown()

func (*Output) XXX_Marshal

func (m *Output) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Output) XXX_Merge

func (m *Output) XXX_Merge(src proto.Message)

func (*Output) XXX_Size

func (m *Output) XXX_Size() int

func (*Output) XXX_Unmarshal

func (m *Output) XXX_Unmarshal(b []byte) error

type P2PMessage

type P2PMessage struct {
	Header               *MsgHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	Data                 []byte     `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

Deprecated P2PMessage is data structure for aergo v0.2 or earlier. This structure is not used anymore since v0.3.0.

func (*P2PMessage) Descriptor

func (*P2PMessage) Descriptor() ([]byte, []int)

func (*P2PMessage) GetData

func (m *P2PMessage) GetData() []byte

func (*P2PMessage) GetHeader

func (m *P2PMessage) GetHeader() *MsgHeader

func (*P2PMessage) ProtoMessage

func (*P2PMessage) ProtoMessage()

func (*P2PMessage) Reset

func (m *P2PMessage) Reset()

func (*P2PMessage) String

func (m *P2PMessage) String() string

func (*P2PMessage) XXX_DiscardUnknown

func (m *P2PMessage) XXX_DiscardUnknown()

func (*P2PMessage) XXX_Marshal

func (m *P2PMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*P2PMessage) XXX_Merge

func (m *P2PMessage) XXX_Merge(src proto.Message)

func (*P2PMessage) XXX_Size

func (m *P2PMessage) XXX_Size() int

func (*P2PMessage) XXX_Unmarshal

func (m *P2PMessage) XXX_Unmarshal(b []byte) error

type PageParams added in v0.9.0

type PageParams struct {
	Offset               uint32   `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"`
	Size                 uint32   `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PageParams) Descriptor added in v0.9.0

func (*PageParams) Descriptor() ([]byte, []int)

func (*PageParams) GetOffset added in v0.9.0

func (m *PageParams) GetOffset() uint32

func (*PageParams) GetSize added in v0.9.0

func (m *PageParams) GetSize() uint32

func (*PageParams) ProtoMessage added in v0.9.0

func (*PageParams) ProtoMessage()

func (*PageParams) Reset added in v0.9.0

func (m *PageParams) Reset()

func (*PageParams) String added in v0.9.0

func (m *PageParams) String() string

func (*PageParams) XXX_DiscardUnknown added in v0.9.0

func (m *PageParams) XXX_DiscardUnknown()

func (*PageParams) XXX_Marshal added in v0.9.0

func (m *PageParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PageParams) XXX_Merge added in v0.9.0

func (m *PageParams) XXX_Merge(src proto.Message)

func (*PageParams) XXX_Size added in v0.9.0

func (m *PageParams) XXX_Size() int

func (*PageParams) XXX_Unmarshal added in v0.9.0

func (m *PageParams) XXX_Unmarshal(b []byte) error

type Paginations added in v0.9.0

type Paginations struct {
	Ref                  []byte   `protobuf:"bytes,1,opt,name=ref,proto3" json:"ref,omitempty"`
	Size                 uint32   `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Paginations) Descriptor added in v0.9.0

func (*Paginations) Descriptor() ([]byte, []int)

func (*Paginations) GetRef added in v0.9.0

func (m *Paginations) GetRef() []byte

func (*Paginations) GetSize added in v0.9.0

func (m *Paginations) GetSize() uint32

func (*Paginations) ProtoMessage added in v0.9.0

func (*Paginations) ProtoMessage()

func (*Paginations) Reset added in v0.9.0

func (m *Paginations) Reset()

func (*Paginations) String added in v0.9.0

func (m *Paginations) String() string

func (*Paginations) XXX_DiscardUnknown added in v0.9.0

func (m *Paginations) XXX_DiscardUnknown()

func (*Paginations) XXX_Marshal added in v0.9.0

func (m *Paginations) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Paginations) XXX_Merge added in v0.9.0

func (m *Paginations) XXX_Merge(src proto.Message)

func (*Paginations) XXX_Size added in v0.9.0

func (m *Paginations) XXX_Size() int

func (*Paginations) XXX_Unmarshal added in v0.9.0

func (m *Paginations) XXX_Unmarshal(b []byte) error

type Peer added in v0.8.1

type Peer struct {
	Address              *PeerAddress    `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Bestblock            *NewBlockNotice `protobuf:"bytes,2,opt,name=bestblock,proto3" json:"bestblock,omitempty"`
	State                int32           `protobuf:"varint,3,opt,name=state,proto3" json:"state,omitempty"`
	Hidden               bool            `protobuf:"varint,4,opt,name=hidden,proto3" json:"hidden,omitempty"`
	LashCheck            int64           `protobuf:"varint,5,opt,name=lashCheck,proto3" json:"lashCheck,omitempty"`
	Selfpeer             bool            `protobuf:"varint,6,opt,name=selfpeer,proto3" json:"selfpeer,omitempty"`
	Version              string          `protobuf:"bytes,7,opt,name=version,proto3" json:"version,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

func (*Peer) Descriptor added in v0.8.1

func (*Peer) Descriptor() ([]byte, []int)

func (*Peer) GetAddress added in v0.8.1

func (m *Peer) GetAddress() *PeerAddress

func (*Peer) GetBestblock added in v0.8.1

func (m *Peer) GetBestblock() *NewBlockNotice

func (*Peer) GetHidden added in v0.9.0

func (m *Peer) GetHidden() bool

func (*Peer) GetLashCheck added in v0.9.0

func (m *Peer) GetLashCheck() int64

func (*Peer) GetSelfpeer added in v0.9.0

func (m *Peer) GetSelfpeer() bool

func (*Peer) GetState added in v0.8.1

func (m *Peer) GetState() int32

func (*Peer) GetVersion added in v0.9.0

func (m *Peer) GetVersion() string

func (*Peer) ProtoMessage added in v0.8.1

func (*Peer) ProtoMessage()

func (*Peer) Reset added in v0.8.1

func (m *Peer) Reset()

func (*Peer) String added in v0.8.1

func (m *Peer) String() string

func (*Peer) XXX_DiscardUnknown added in v0.8.1

func (m *Peer) XXX_DiscardUnknown()

func (*Peer) XXX_Marshal added in v0.8.1

func (m *Peer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Peer) XXX_Merge added in v0.8.1

func (m *Peer) XXX_Merge(src proto.Message)

func (*Peer) XXX_Size added in v0.8.1

func (m *Peer) XXX_Size() int

func (*Peer) XXX_Unmarshal added in v0.8.1

func (m *Peer) XXX_Unmarshal(b []byte) error

type PeerAddress

type PeerAddress struct {
	// address is string representation of ip address or domain name.
	Address              string   `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Port                 uint32   `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
	PeerID               []byte   `protobuf:"bytes,3,opt,name=peerID,proto3" json:"peerID,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PeerAddress) Descriptor

func (*PeerAddress) Descriptor() ([]byte, []int)

func (*PeerAddress) GetAddress

func (m *PeerAddress) GetAddress() string

func (*PeerAddress) GetPeerID

func (m *PeerAddress) GetPeerID() []byte

func (*PeerAddress) GetPort

func (m *PeerAddress) GetPort() uint32

func (*PeerAddress) ProtoMessage

func (*PeerAddress) ProtoMessage()

func (*PeerAddress) Reset

func (m *PeerAddress) Reset()

func (*PeerAddress) String

func (m *PeerAddress) String() string

func (*PeerAddress) XXX_DiscardUnknown

func (m *PeerAddress) XXX_DiscardUnknown()

func (*PeerAddress) XXX_Marshal

func (m *PeerAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PeerAddress) XXX_Merge

func (m *PeerAddress) XXX_Merge(src proto.Message)

func (*PeerAddress) XXX_Size

func (m *PeerAddress) XXX_Size() int

func (*PeerAddress) XXX_Unmarshal

func (m *PeerAddress) XXX_Unmarshal(b []byte) error

type PeerBlockInfo added in v0.9.0

type PeerBlockInfo interface {
	ID() PeerID
	State() PeerState
	LastStatus() *LastBlockStatus
}

type PeerID added in v0.9.0

type PeerID = core.PeerID

PeerID is identier of peer. it is alias of libp2p.PeerID for now

func IDB58Decode added in v0.9.0

func IDB58Decode(b58 string) (PeerID, error)

func IDFromBytes added in v0.9.0

func IDFromBytes(b []byte) (PeerID, error)

func IDFromPrivateKey added in v0.9.0

func IDFromPrivateKey(sk crypto.PrivKey) (PeerID, error)

func IDFromPublicKey added in v0.9.0

func IDFromPublicKey(pubKey crypto.PubKey) (PeerID, error)

type PeerList

type PeerList struct {
	Peers                []*Peer  `protobuf:"bytes,1,rep,name=peers,proto3" json:"peers,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PeerList) Descriptor

func (*PeerList) Descriptor() ([]byte, []int)

func (*PeerList) GetPeers

func (m *PeerList) GetPeers() []*Peer

func (*PeerList) ProtoMessage

func (*PeerList) ProtoMessage()

func (*PeerList) Reset

func (m *PeerList) Reset()

func (*PeerList) String

func (m *PeerList) String() string

func (*PeerList) XXX_DiscardUnknown

func (m *PeerList) XXX_DiscardUnknown()

func (*PeerList) XXX_Marshal

func (m *PeerList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PeerList) XXX_Merge

func (m *PeerList) XXX_Merge(src proto.Message)

func (*PeerList) XXX_Size

func (m *PeerList) XXX_Size() int

func (*PeerList) XXX_Unmarshal

func (m *PeerList) XXX_Unmarshal(b []byte) error

type PeerMetric added in v0.8.2

type PeerMetric struct {
	PeerID               []byte   `protobuf:"bytes,1,opt,name=peerID,proto3" json:"peerID,omitempty"`
	SumIn                int64    `protobuf:"varint,2,opt,name=sumIn,proto3" json:"sumIn,omitempty"`
	AvrIn                int64    `protobuf:"varint,3,opt,name=avrIn,proto3" json:"avrIn,omitempty"`
	SumOut               int64    `protobuf:"varint,4,opt,name=sumOut,proto3" json:"sumOut,omitempty"`
	AvrOut               int64    `protobuf:"varint,5,opt,name=avrOut,proto3" json:"avrOut,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PeerMetric) Descriptor added in v0.8.2

func (*PeerMetric) Descriptor() ([]byte, []int)

func (*PeerMetric) GetAvrIn added in v0.8.2

func (m *PeerMetric) GetAvrIn() int64

func (*PeerMetric) GetAvrOut added in v0.8.2

func (m *PeerMetric) GetAvrOut() int64

func (*PeerMetric) GetPeerID added in v0.8.2

func (m *PeerMetric) GetPeerID() []byte

func (*PeerMetric) GetSumIn added in v0.8.2

func (m *PeerMetric) GetSumIn() int64

func (*PeerMetric) GetSumOut added in v0.8.2

func (m *PeerMetric) GetSumOut() int64

func (*PeerMetric) ProtoMessage added in v0.8.2

func (*PeerMetric) ProtoMessage()

func (*PeerMetric) Reset added in v0.8.2

func (m *PeerMetric) Reset()

func (*PeerMetric) String added in v0.8.2

func (m *PeerMetric) String() string

func (*PeerMetric) XXX_DiscardUnknown added in v0.8.2

func (m *PeerMetric) XXX_DiscardUnknown()

func (*PeerMetric) XXX_Marshal added in v0.8.2

func (m *PeerMetric) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PeerMetric) XXX_Merge added in v0.8.2

func (m *PeerMetric) XXX_Merge(src proto.Message)

func (*PeerMetric) XXX_Size added in v0.8.2

func (m *PeerMetric) XXX_Size() int

func (*PeerMetric) XXX_Unmarshal added in v0.8.2

func (m *PeerMetric) XXX_Unmarshal(b []byte) error

type PeerState

type PeerState int32

PeerState indicated current state of peer, but

const (
	// STARTING means connection is just estabished.
	STARTING PeerState = iota
	// HANDSHAKING means that local host sent status message but not receive status message from remote
	HANDSHAKING
	// RUNNING means complete handshake (i.e. exchanged status message) and can communicate each other
	RUNNING
	// STOPPING means peer was received stop signal and working in termination process. No new message is sent and receiving message is ignored.
	STOPPING
	// STOPPED means peer was tatally finished.
	STOPPED
	// DOWN means server can't communicate to remote peer. peer will be delete after TTL or
	DOWN
)

indicating status of remote peer

func (*PeerState) Get

func (s *PeerState) Get() PeerState

Get returns current state with concurrent manner

func (*PeerState) SetAndGet

func (s *PeerState) SetAndGet(ns PeerState) PeerState

SetAndGet change state in atomic manner

func (PeerState) String

func (i PeerState) String() string

type PeersParams added in v0.9.0

type PeersParams struct {
	NoHidden             bool     `protobuf:"varint,1,opt,name=noHidden,proto3" json:"noHidden,omitempty"`
	ShowSelf             bool     `protobuf:"varint,2,opt,name=showSelf,proto3" json:"showSelf,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PeersParams) Descriptor added in v0.9.0

func (*PeersParams) Descriptor() ([]byte, []int)

func (*PeersParams) GetNoHidden added in v0.9.0

func (m *PeersParams) GetNoHidden() bool

func (*PeersParams) GetShowSelf added in v0.9.0

func (m *PeersParams) GetShowSelf() bool

func (*PeersParams) ProtoMessage added in v0.9.0

func (*PeersParams) ProtoMessage()

func (*PeersParams) Reset added in v0.9.0

func (m *PeersParams) Reset()

func (*PeersParams) String added in v0.9.0

func (m *PeersParams) String() string

func (*PeersParams) XXX_DiscardUnknown added in v0.9.0

func (m *PeersParams) XXX_DiscardUnknown()

func (*PeersParams) XXX_Marshal added in v0.9.0

func (m *PeersParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PeersParams) XXX_Merge added in v0.9.0

func (m *PeersParams) XXX_Merge(src proto.Message)

func (*PeersParams) XXX_Size added in v0.9.0

func (m *PeersParams) XXX_Size() int

func (*PeersParams) XXX_Unmarshal added in v0.9.0

func (m *PeersParams) XXX_Unmarshal(b []byte) error

type Personal

type Personal struct {
	Passphrase           string   `protobuf:"bytes,1,opt,name=passphrase,proto3" json:"passphrase,omitempty"`
	Account              *Account `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Personal) Descriptor

func (*Personal) Descriptor() ([]byte, []int)

func (*Personal) GetAccount

func (m *Personal) GetAccount() *Account

func (*Personal) GetPassphrase

func (m *Personal) GetPassphrase() string

func (*Personal) ProtoMessage

func (*Personal) ProtoMessage()

func (*Personal) Reset

func (m *Personal) Reset()

func (*Personal) String

func (m *Personal) String() string

func (*Personal) XXX_DiscardUnknown

func (m *Personal) XXX_DiscardUnknown()

func (*Personal) XXX_Marshal

func (m *Personal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Personal) XXX_Merge

func (m *Personal) XXX_Merge(src proto.Message)

func (*Personal) XXX_Size

func (m *Personal) XXX_Size() int

func (*Personal) XXX_Unmarshal

func (m *Personal) XXX_Unmarshal(b []byte) error

type Ping

type Ping struct {
	BestBlockHash        []byte   `protobuf:"bytes,1,opt,name=best_block_hash,json=bestBlockHash,proto3" json:"best_block_hash,omitempty"`
	BestHeight           uint64   `protobuf:"varint,2,opt,name=best_height,json=bestHeight,proto3" json:"best_height,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Ping request message

func (*Ping) Descriptor

func (*Ping) Descriptor() ([]byte, []int)

func (*Ping) GetBestBlockHash

func (m *Ping) GetBestBlockHash() []byte

func (*Ping) GetBestHeight

func (m *Ping) GetBestHeight() uint64

func (*Ping) ProtoMessage

func (*Ping) ProtoMessage()

func (*Ping) Reset

func (m *Ping) Reset()

func (*Ping) String

func (m *Ping) String() string

func (*Ping) XXX_DiscardUnknown

func (m *Ping) XXX_DiscardUnknown()

func (*Ping) XXX_Marshal

func (m *Ping) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Ping) XXX_Merge

func (m *Ping) XXX_Merge(src proto.Message)

func (*Ping) XXX_Size

func (m *Ping) XXX_Size() int

func (*Ping) XXX_Unmarshal

func (m *Ping) XXX_Unmarshal(b []byte) error

type PolarisPeer added in v0.9.0

type PolarisPeer struct {
	Address   *PeerAddress `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Connected int64        `protobuf:"varint,2,opt,name=connected,proto3" json:"connected,omitempty"`
	// lastCheck contains unixtimestamp with nanoseconds precision
	LastCheck            int64    `protobuf:"varint,3,opt,name=lastCheck,proto3" json:"lastCheck,omitempty"`
	Verion               string   `protobuf:"bytes,4,opt,name=verion,proto3" json:"verion,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PolarisPeer) Descriptor added in v0.9.0

func (*PolarisPeer) Descriptor() ([]byte, []int)

func (*PolarisPeer) GetAddress added in v0.9.0

func (m *PolarisPeer) GetAddress() *PeerAddress

func (*PolarisPeer) GetConnected added in v0.9.0

func (m *PolarisPeer) GetConnected() int64

func (*PolarisPeer) GetLastCheck added in v0.9.0

func (m *PolarisPeer) GetLastCheck() int64

func (*PolarisPeer) GetVerion added in v0.9.0

func (m *PolarisPeer) GetVerion() string

func (*PolarisPeer) ProtoMessage added in v0.9.0

func (*PolarisPeer) ProtoMessage()

func (*PolarisPeer) Reset added in v0.9.0

func (m *PolarisPeer) Reset()

func (*PolarisPeer) String added in v0.9.0

func (m *PolarisPeer) String() string

func (*PolarisPeer) XXX_DiscardUnknown added in v0.9.0

func (m *PolarisPeer) XXX_DiscardUnknown()

func (*PolarisPeer) XXX_Marshal added in v0.9.0

func (m *PolarisPeer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PolarisPeer) XXX_Merge added in v0.9.0

func (m *PolarisPeer) XXX_Merge(src proto.Message)

func (*PolarisPeer) XXX_Size added in v0.9.0

func (m *PolarisPeer) XXX_Size() int

func (*PolarisPeer) XXX_Unmarshal added in v0.9.0

func (m *PolarisPeer) XXX_Unmarshal(b []byte) error

type PolarisPeerList added in v0.9.0

type PolarisPeerList struct {
	Total                uint32         `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
	HasNext              bool           `protobuf:"varint,2,opt,name=hasNext,proto3" json:"hasNext,omitempty"`
	Peers                []*PolarisPeer `protobuf:"bytes,3,rep,name=peers,proto3" json:"peers,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

func (*PolarisPeerList) Descriptor added in v0.9.0

func (*PolarisPeerList) Descriptor() ([]byte, []int)

func (*PolarisPeerList) GetHasNext added in v0.9.0

func (m *PolarisPeerList) GetHasNext() bool

func (*PolarisPeerList) GetPeers added in v0.9.0

func (m *PolarisPeerList) GetPeers() []*PolarisPeer

func (*PolarisPeerList) GetTotal added in v0.9.0

func (m *PolarisPeerList) GetTotal() uint32

func (*PolarisPeerList) ProtoMessage added in v0.9.0

func (*PolarisPeerList) ProtoMessage()

func (*PolarisPeerList) Reset added in v0.9.0

func (m *PolarisPeerList) Reset()

func (*PolarisPeerList) String added in v0.9.0

func (m *PolarisPeerList) String() string

func (*PolarisPeerList) XXX_DiscardUnknown added in v0.9.0

func (m *PolarisPeerList) XXX_DiscardUnknown()

func (*PolarisPeerList) XXX_Marshal added in v0.9.0

func (m *PolarisPeerList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PolarisPeerList) XXX_Merge added in v0.9.0

func (m *PolarisPeerList) XXX_Merge(src proto.Message)

func (*PolarisPeerList) XXX_Size added in v0.9.0

func (m *PolarisPeerList) XXX_Size() int

func (*PolarisPeerList) XXX_Unmarshal added in v0.9.0

func (m *PolarisPeerList) XXX_Unmarshal(b []byte) error

type PolarisRPCServiceClient added in v0.9.0

type PolarisRPCServiceClient interface {
	// Returns the current state of this node
	NodeState(ctx context.Context, in *NodeReq, opts ...grpc.CallOption) (*SingleBytes, error)
	// Returns node metrics according to request
	Metric(ctx context.Context, in *MetricsRequest, opts ...grpc.CallOption) (*Metrics, error)
	CurrentList(ctx context.Context, in *Paginations, opts ...grpc.CallOption) (*PolarisPeerList, error)
	WhiteList(ctx context.Context, in *Paginations, opts ...grpc.CallOption) (*PolarisPeerList, error)
	BlackList(ctx context.Context, in *Paginations, opts ...grpc.CallOption) (*PolarisPeerList, error)
}

PolarisRPCServiceClient is the client API for PolarisRPCService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewPolarisRPCServiceClient added in v0.9.0

func NewPolarisRPCServiceClient(cc *grpc.ClientConn) PolarisRPCServiceClient

type PolarisRPCServiceServer added in v0.9.0

type PolarisRPCServiceServer interface {
	// Returns the current state of this node
	NodeState(context.Context, *NodeReq) (*SingleBytes, error)
	// Returns node metrics according to request
	Metric(context.Context, *MetricsRequest) (*Metrics, error)
	CurrentList(context.Context, *Paginations) (*PolarisPeerList, error)
	WhiteList(context.Context, *Paginations) (*PolarisPeerList, error)
	BlackList(context.Context, *Paginations) (*PolarisPeerList, error)
}

PolarisRPCServiceServer is the server API for PolarisRPCService service.

type Pong

type Pong struct {
	BestBlockHash        []byte   `protobuf:"bytes,1,opt,name=bestBlockHash,proto3" json:"bestBlockHash,omitempty"`
	BestHeight           uint64   `protobuf:"varint,2,opt,name=bestHeight,proto3" json:"bestHeight,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Ping response message

func (*Pong) Descriptor

func (*Pong) Descriptor() ([]byte, []int)

func (*Pong) GetBestBlockHash

func (m *Pong) GetBestBlockHash() []byte

func (*Pong) GetBestHeight

func (m *Pong) GetBestHeight() uint64

func (*Pong) ProtoMessage

func (*Pong) ProtoMessage()

func (*Pong) Reset

func (m *Pong) Reset()

func (*Pong) String

func (m *Pong) String() string

func (*Pong) XXX_DiscardUnknown

func (m *Pong) XXX_DiscardUnknown()

func (*Pong) XXX_Marshal

func (m *Pong) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Pong) XXX_Merge

func (m *Pong) XXX_Merge(src proto.Message)

func (*Pong) XXX_Size

func (m *Pong) XXX_Size() int

func (*Pong) XXX_Unmarshal

func (m *Pong) XXX_Unmarshal(b []byte) error

type Query

type Query struct {
	ContractAddress      []byte   `protobuf:"bytes,1,opt,name=contractAddress,proto3" json:"contractAddress,omitempty"`
	Queryinfo            []byte   `protobuf:"bytes,2,opt,name=queryinfo,proto3" json:"queryinfo,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Query) Descriptor

func (*Query) Descriptor() ([]byte, []int)

func (*Query) GetContractAddress

func (m *Query) GetContractAddress() []byte

func (*Query) GetQueryinfo

func (m *Query) GetQueryinfo() []byte

func (*Query) ProtoMessage

func (*Query) ProtoMessage()

func (*Query) Reset

func (m *Query) Reset()

func (*Query) String

func (m *Query) String() string

func (*Query) XXX_DiscardUnknown

func (m *Query) XXX_DiscardUnknown()

func (*Query) XXX_Marshal

func (m *Query) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Query) XXX_Merge

func (m *Query) XXX_Merge(src proto.Message)

func (*Query) XXX_Size

func (m *Query) XXX_Size() int

func (*Query) XXX_Unmarshal

func (m *Query) XXX_Unmarshal(b []byte) error

type Receipt

type Receipt struct {
	ContractAddress      []byte   `protobuf:"bytes,1,opt,name=contractAddress,proto3" json:"contractAddress,omitempty"`
	Status               string   `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	Ret                  string   `protobuf:"bytes,3,opt,name=ret,proto3" json:"ret,omitempty"`
	TxHash               []byte   `protobuf:"bytes,4,opt,name=txHash,proto3" json:"txHash,omitempty"`
	FeeUsed              []byte   `protobuf:"bytes,5,opt,name=feeUsed,proto3" json:"feeUsed,omitempty"`
	CumulativeFeeUsed    []byte   `protobuf:"bytes,6,opt,name=cumulativeFeeUsed,proto3" json:"cumulativeFeeUsed,omitempty"`
	Bloom                []byte   `protobuf:"bytes,7,opt,name=bloom,proto3" json:"bloom,omitempty"`
	Events               []*Event `protobuf:"bytes,8,rep,name=events,proto3" json:"events,omitempty"`
	BlockNo              uint64   `protobuf:"varint,9,opt,name=blockNo,proto3" json:"blockNo,omitempty"`
	BlockHash            []byte   `protobuf:"bytes,10,opt,name=blockHash,proto3" json:"blockHash,omitempty"`
	TxIndex              int32    `protobuf:"varint,11,opt,name=txIndex,proto3" json:"txIndex,omitempty"`
	From                 []byte   `protobuf:"bytes,12,opt,name=from,proto3" json:"from,omitempty"`
	To                   []byte   `protobuf:"bytes,13,opt,name=to,proto3" json:"to,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func NewReceipt

func NewReceipt(contractAddress []byte, status string, jsonRet string) *Receipt

func (*Receipt) BloomFilter added in v0.9.0

func (r *Receipt) BloomFilter(fi *FilterInfo) bool

func (*Receipt) Descriptor

func (*Receipt) Descriptor() ([]byte, []int)

func (*Receipt) GetBlockHash added in v0.9.0

func (m *Receipt) GetBlockHash() []byte

func (*Receipt) GetBlockNo added in v0.9.0

func (m *Receipt) GetBlockNo() uint64

func (*Receipt) GetBloom added in v0.9.0

func (m *Receipt) GetBloom() []byte

func (*Receipt) GetContractAddress

func (m *Receipt) GetContractAddress() []byte

func (*Receipt) GetCumulativeFeeUsed added in v0.9.0

func (m *Receipt) GetCumulativeFeeUsed() []byte

func (*Receipt) GetEvents added in v0.9.0

func (m *Receipt) GetEvents() []*Event

func (*Receipt) GetFeeUsed added in v0.9.0

func (m *Receipt) GetFeeUsed() []byte

func (*Receipt) GetFrom added in v0.9.0

func (m *Receipt) GetFrom() []byte

func (*Receipt) GetHash

func (r *Receipt) GetHash() []byte

func (*Receipt) GetRet

func (m *Receipt) GetRet() string

func (*Receipt) GetStatus

func (m *Receipt) GetStatus() string

func (*Receipt) GetTo added in v0.9.0

func (m *Receipt) GetTo() []byte

func (*Receipt) GetTxHash added in v0.9.0

func (m *Receipt) GetTxHash() []byte

func (*Receipt) GetTxIndex added in v0.9.0

func (m *Receipt) GetTxIndex() int32

func (*Receipt) MarshalBinary

func (r *Receipt) MarshalBinary() ([]byte, error)

func (*Receipt) MarshalJSON

func (r *Receipt) MarshalJSON() ([]byte, error)

func (*Receipt) MarshalJSONPB

func (r *Receipt) MarshalJSONPB(*jsonpb.Marshaler) ([]byte, error)

func (*Receipt) MarshalMerkleBinary added in v0.9.0

func (r *Receipt) MarshalMerkleBinary() ([]byte, error)

func (*Receipt) ProtoMessage

func (*Receipt) ProtoMessage()

func (*Receipt) ReadFrom added in v0.9.0

func (r *Receipt) ReadFrom(data []byte) ([]byte, error)

func (*Receipt) Reset

func (m *Receipt) Reset()

func (*Receipt) SetMemoryInfo added in v0.9.0

func (r *Receipt) SetMemoryInfo(blkHash []byte, blkNo BlockNo, txIdx int32)

func (*Receipt) String

func (m *Receipt) String() string

func (*Receipt) UnmarshalBinary

func (r *Receipt) UnmarshalBinary(data []byte) error

func (*Receipt) XXX_DiscardUnknown

func (m *Receipt) XXX_DiscardUnknown()

func (*Receipt) XXX_Marshal

func (m *Receipt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Receipt) XXX_Merge

func (m *Receipt) XXX_Merge(src proto.Message)

func (*Receipt) XXX_Size

func (m *Receipt) XXX_Size() int

func (*Receipt) XXX_Unmarshal

func (m *Receipt) XXX_Unmarshal(b []byte) error

type Receipts

type Receipts struct {
	// contains filtered or unexported fields
}

func (*Receipts) BloomFilter added in v0.9.0

func (rs *Receipts) BloomFilter(fi *FilterInfo) bool

func (*Receipts) Get added in v0.9.0

func (rs *Receipts) Get() []*Receipt

func (*Receipts) MarshalBinary added in v0.9.0

func (rs *Receipts) MarshalBinary() ([]byte, error)

func (*Receipts) MergeBloom added in v0.9.0

func (rs *Receipts) MergeBloom(bf *bloom.BloomFilter) error

func (*Receipts) MerkleRoot

func (rs *Receipts) MerkleRoot() []byte

func (*Receipts) Set added in v0.9.0

func (rs *Receipts) Set(receipts []*Receipt)

func (*Receipts) UnmarshalBinary added in v0.9.0

func (rs *Receipts) UnmarshalBinary(data []byte) error

type ResponseMessage added in v0.9.0

type ResponseMessage interface {
	GetStatus() ResultStatus
}

ResponseMessage contains response status

type ResultStatus

type ResultStatus int32

Not all response contains ResultStatus value. names from gRPC status

const (
	// OK is returned on success.
	ResultStatus_OK ResultStatus = 0
	// CANCELED when operation was canceled (typically by the caller).
	ResultStatus_CANCELED ResultStatus = 1
	// UNKNOWN
	ResultStatus_UNKNOWN ResultStatus = 2
	// INVALID_ARGUMENT is missing or wrong value of argument
	ResultStatus_INVALID_ARGUMENT ResultStatus = 3
	// DEADLINE_EXCEEDED timeout
	ResultStatus_DEADLINE_EXCEEDED ResultStatus = 4
	// NOT_FOUND
	ResultStatus_NOT_FOUND ResultStatus = 5
	// ALREADY_EXISTS
	ResultStatus_ALREADY_EXISTS ResultStatus = 6
	// PERMISSION_DENIED
	ResultStatus_PERMISSION_DENIED ResultStatus = 7
	//
	ResultStatus_RESOURCE_EXHAUSTED ResultStatus = 8
	//
	ResultStatus_FAILED_PRECONDITION ResultStatus = 9
	// ABORTED
	ResultStatus_ABORTED ResultStatus = 10
	//
	ResultStatus_OUT_OF_RANGE ResultStatus = 11
	// UNIMPLEMENTED indicates operation is not implemented or not
	// supported/enabled in this service.
	ResultStatus_UNIMPLEMENTED ResultStatus = 12
	// INTERNAL errors. Means some invariants expected by underlying
	// system has been broken. If you see one of these errors,
	// something is very broken.
	ResultStatus_INTERNAL ResultStatus = 13
	// Unavailable indicates the service is currently unavailable.
	// This is a most likely a transient condition and may be corrected
	// by retrying with a backoff.
	//
	// See litmus test above for deciding between FailedPrecondition,
	// Aborted, and Unavailable.
	ResultStatus_UNAVAILABLE ResultStatus = 14
	ResultStatus_DATA_LOSS   ResultStatus = 15
	// UNAUTHENTICATED indicates the request does not have valid
	// authentication credentials for the operation.
	ResultStatus_UNAUTHENTICATED ResultStatus = 16
)

func (ResultStatus) EnumDescriptor

func (ResultStatus) EnumDescriptor() ([]byte, []int)

func (ResultStatus) String

func (x ResultStatus) String() string

type ServerInfo added in v0.9.0

type ServerInfo struct {
	Status               map[string]string      `` /* 153-byte string literal not displayed */
	Config               map[string]*ConfigItem `` /* 153-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}               `json:"-"`
	XXX_unrecognized     []byte                 `json:"-"`
	XXX_sizecache        int32                  `json:"-"`
}

func (*ServerInfo) Descriptor added in v0.9.0

func (*ServerInfo) Descriptor() ([]byte, []int)

func (*ServerInfo) GetConfig added in v0.9.0

func (m *ServerInfo) GetConfig() map[string]*ConfigItem

func (*ServerInfo) GetStatus added in v0.9.0

func (m *ServerInfo) GetStatus() map[string]string

func (*ServerInfo) ProtoMessage added in v0.9.0

func (*ServerInfo) ProtoMessage()

func (*ServerInfo) Reset added in v0.9.0

func (m *ServerInfo) Reset()

func (*ServerInfo) String added in v0.9.0

func (m *ServerInfo) String() string

func (*ServerInfo) XXX_DiscardUnknown added in v0.9.0

func (m *ServerInfo) XXX_DiscardUnknown()

func (*ServerInfo) XXX_Marshal added in v0.9.0

func (m *ServerInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ServerInfo) XXX_Merge added in v0.9.0

func (m *ServerInfo) XXX_Merge(src proto.Message)

func (*ServerInfo) XXX_Size added in v0.9.0

func (m *ServerInfo) XXX_Size() int

func (*ServerInfo) XXX_Unmarshal added in v0.9.0

func (m *ServerInfo) XXX_Unmarshal(b []byte) error

type SingleBytes

type SingleBytes struct {
	Value                []byte   `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SingleBytes) Descriptor

func (*SingleBytes) Descriptor() ([]byte, []int)

func (*SingleBytes) GetValue

func (m *SingleBytes) GetValue() []byte

func (*SingleBytes) ProtoMessage

func (*SingleBytes) ProtoMessage()

func (*SingleBytes) Reset

func (m *SingleBytes) Reset()

func (*SingleBytes) String

func (m *SingleBytes) String() string

func (*SingleBytes) XXX_DiscardUnknown

func (m *SingleBytes) XXX_DiscardUnknown()

func (*SingleBytes) XXX_Marshal

func (m *SingleBytes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SingleBytes) XXX_Merge

func (m *SingleBytes) XXX_Merge(src proto.Message)

func (*SingleBytes) XXX_Size

func (m *SingleBytes) XXX_Size() int

func (*SingleBytes) XXX_Unmarshal

func (m *SingleBytes) XXX_Unmarshal(b []byte) error

type Staking added in v0.8.1

type Staking struct {
	Amount               []byte   `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"`
	When                 uint64   `protobuf:"varint,2,opt,name=when,proto3" json:"when,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Staking) Descriptor added in v0.8.1

func (*Staking) Descriptor() ([]byte, []int)

func (*Staking) GetAmount added in v0.8.1

func (m *Staking) GetAmount() []byte

func (*Staking) GetAmountBigInt added in v0.8.2

func (s *Staking) GetAmountBigInt() *big.Int

func (*Staking) GetWhen added in v0.8.1

func (m *Staking) GetWhen() uint64

func (*Staking) ProtoMessage added in v0.8.1

func (*Staking) ProtoMessage()

func (*Staking) Reset added in v0.8.1

func (m *Staking) Reset()

func (*Staking) String added in v0.8.1

func (m *Staking) String() string

func (*Staking) XXX_DiscardUnknown added in v0.8.1

func (m *Staking) XXX_DiscardUnknown()

func (*Staking) XXX_Marshal added in v0.8.1

func (m *Staking) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Staking) XXX_Merge added in v0.8.1

func (m *Staking) XXX_Merge(src proto.Message)

func (*Staking) XXX_Size added in v0.8.1

func (m *Staking) XXX_Size() int

func (*Staking) XXX_Unmarshal added in v0.8.1

func (m *Staking) XXX_Unmarshal(b []byte) error

type State

type State struct {
	Nonce                uint64   `protobuf:"varint,1,opt,name=nonce,proto3" json:"nonce,omitempty"`
	Balance              []byte   `protobuf:"bytes,2,opt,name=balance,proto3" json:"balance,omitempty"`
	CodeHash             []byte   `protobuf:"bytes,3,opt,name=codeHash,proto3" json:"codeHash,omitempty"`
	StorageRoot          []byte   `protobuf:"bytes,4,opt,name=storageRoot,proto3" json:"storageRoot,omitempty"`
	SqlRecoveryPoint     uint64   `protobuf:"varint,5,opt,name=sqlRecoveryPoint,proto3" json:"sqlRecoveryPoint,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func NewState

func NewState() *State

NewState returns an instance of account state

func (*State) Descriptor

func (*State) Descriptor() ([]byte, []int)

func (*State) GetBalance

func (m *State) GetBalance() []byte

func (*State) GetBalanceBigInt added in v0.8.2

func (st *State) GetBalanceBigInt() *big.Int

func (*State) GetCodeHash

func (m *State) GetCodeHash() []byte

func (*State) GetNonce

func (m *State) GetNonce() uint64

func (*State) GetSqlRecoveryPoint

func (m *State) GetSqlRecoveryPoint() uint64

func (*State) GetStorageRoot

func (m *State) GetStorageRoot() []byte

func (*State) ProtoMessage

func (*State) ProtoMessage()

func (*State) Reset

func (m *State) Reset()

func (*State) String

func (m *State) String() string

func (*State) XXX_DiscardUnknown

func (m *State) XXX_DiscardUnknown()

func (*State) XXX_Marshal

func (m *State) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*State) XXX_Merge

func (m *State) XXX_Merge(src proto.Message)

func (*State) XXX_Size

func (m *State) XXX_Size() int

func (*State) XXX_Unmarshal

func (m *State) XXX_Unmarshal(b []byte) error

type StateQuery added in v0.8.1

type StateQuery struct {
	ContractAddress      []byte   `protobuf:"bytes,1,opt,name=contractAddress,proto3" json:"contractAddress,omitempty"`
	StorageKeys          []string `protobuf:"bytes,2,rep,name=storageKeys,proto3" json:"storageKeys,omitempty"`
	Root                 []byte   `protobuf:"bytes,3,opt,name=root,proto3" json:"root,omitempty"`
	Compressed           bool     `protobuf:"varint,4,opt,name=compressed,proto3" json:"compressed,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*StateQuery) Descriptor added in v0.8.1

func (*StateQuery) Descriptor() ([]byte, []int)

func (*StateQuery) GetCompressed added in v0.8.1

func (m *StateQuery) GetCompressed() bool

func (*StateQuery) GetContractAddress added in v0.8.1

func (m *StateQuery) GetContractAddress() []byte

func (*StateQuery) GetRoot added in v0.8.1

func (m *StateQuery) GetRoot() []byte

func (*StateQuery) GetStorageKeys added in v0.9.0

func (m *StateQuery) GetStorageKeys() []string

func (*StateQuery) ProtoMessage added in v0.8.1

func (*StateQuery) ProtoMessage()

func (*StateQuery) Reset added in v0.8.1

func (m *StateQuery) Reset()

func (*StateQuery) String added in v0.8.1

func (m *StateQuery) String() string

func (*StateQuery) XXX_DiscardUnknown added in v0.8.1

func (m *StateQuery) XXX_DiscardUnknown()

func (*StateQuery) XXX_Marshal added in v0.8.1

func (m *StateQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StateQuery) XXX_Merge added in v0.8.1

func (m *StateQuery) XXX_Merge(src proto.Message)

func (*StateQuery) XXX_Size added in v0.8.1

func (m *StateQuery) XXX_Size() int

func (*StateQuery) XXX_Unmarshal added in v0.8.1

func (m *StateQuery) XXX_Unmarshal(b []byte) error

type StateQueryProof added in v0.8.1

type StateQueryProof struct {
	ContractProof        *AccountProof       `protobuf:"bytes,1,opt,name=contractProof,proto3" json:"contractProof,omitempty"`
	VarProofs            []*ContractVarProof `protobuf:"bytes,2,rep,name=varProofs,proto3" json:"varProofs,omitempty"`
	XXX_NoUnkeyedLiteral struct{}            `json:"-"`
	XXX_unrecognized     []byte              `json:"-"`
	XXX_sizecache        int32               `json:"-"`
}

func (*StateQueryProof) Descriptor added in v0.8.1

func (*StateQueryProof) Descriptor() ([]byte, []int)

func (*StateQueryProof) GetContractProof added in v0.8.1

func (m *StateQueryProof) GetContractProof() *AccountProof

func (*StateQueryProof) GetVarProofs added in v0.9.0

func (m *StateQueryProof) GetVarProofs() []*ContractVarProof

func (*StateQueryProof) ProtoMessage added in v0.8.1

func (*StateQueryProof) ProtoMessage()

func (*StateQueryProof) Reset added in v0.8.1

func (m *StateQueryProof) Reset()

func (*StateQueryProof) String added in v0.8.1

func (m *StateQueryProof) String() string

func (*StateQueryProof) XXX_DiscardUnknown added in v0.8.1

func (m *StateQueryProof) XXX_DiscardUnknown()

func (*StateQueryProof) XXX_Marshal added in v0.8.1

func (m *StateQueryProof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StateQueryProof) XXX_Merge added in v0.8.1

func (m *StateQueryProof) XXX_Merge(src proto.Message)

func (*StateQueryProof) XXX_Size added in v0.8.1

func (m *StateQueryProof) XXX_Size() int

func (*StateQueryProof) XXX_Unmarshal added in v0.8.1

func (m *StateQueryProof) XXX_Unmarshal(b []byte) error

type StateVar added in v0.8.2

type StateVar struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Type                 string   `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	Len                  int32    `protobuf:"varint,3,opt,name=len,proto3" json:"len,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*StateVar) Descriptor added in v0.8.2

func (*StateVar) Descriptor() ([]byte, []int)

func (*StateVar) GetLen added in v0.9.0

func (m *StateVar) GetLen() int32

func (*StateVar) GetName added in v0.8.2

func (m *StateVar) GetName() string

func (*StateVar) GetType added in v0.8.2

func (m *StateVar) GetType() string

func (*StateVar) ProtoMessage added in v0.8.2

func (*StateVar) ProtoMessage()

func (*StateVar) Reset added in v0.8.2

func (m *StateVar) Reset()

func (*StateVar) String added in v0.8.2

func (m *StateVar) String() string

func (*StateVar) XXX_DiscardUnknown added in v0.8.2

func (m *StateVar) XXX_DiscardUnknown()

func (*StateVar) XXX_Marshal added in v0.8.2

func (m *StateVar) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StateVar) XXX_Merge added in v0.8.2

func (m *StateVar) XXX_Merge(src proto.Message)

func (*StateVar) XXX_Size added in v0.8.2

func (m *StateVar) XXX_Size() int

func (*StateVar) XXX_Unmarshal added in v0.8.2

func (m *StateVar) XXX_Unmarshal(b []byte) error

type Status

type Status struct {
	Sender        *PeerAddress `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	BestBlockHash []byte       `protobuf:"bytes,2,opt,name=bestBlockHash,proto3" json:"bestBlockHash,omitempty"`
	BestHeight    uint64       `protobuf:"varint,3,opt,name=bestHeight,proto3" json:"bestHeight,omitempty"`
	ChainID       []byte       `protobuf:"bytes,4,opt,name=chainID,proto3" json:"chainID,omitempty"`
	// noExpose means that peer doesn't want to be known to other peers.
	NoExpose bool `protobuf:"varint,5,opt,name=noExpose,proto3" json:"noExpose,omitempty"`
	// version of server binary
	Version              string   `protobuf:"bytes,6,opt,name=version,proto3" json:"version,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Status is peer status exchanged during handshaking.

func (*Status) Descriptor

func (*Status) Descriptor() ([]byte, []int)

func (*Status) GetBestBlockHash

func (m *Status) GetBestBlockHash() []byte

func (*Status) GetBestHeight

func (m *Status) GetBestHeight() uint64

func (*Status) GetChainID added in v0.9.0

func (m *Status) GetChainID() []byte

func (*Status) GetNoExpose added in v0.9.0

func (m *Status) GetNoExpose() bool

func (*Status) GetSender

func (m *Status) GetSender() *PeerAddress

func (*Status) GetVersion added in v0.9.0

func (m *Status) GetVersion() string

func (*Status) ProtoMessage

func (*Status) ProtoMessage()

func (*Status) Reset

func (m *Status) Reset()

func (*Status) String

func (m *Status) String() string

func (*Status) XXX_DiscardUnknown

func (m *Status) XXX_DiscardUnknown()

func (*Status) XXX_Marshal

func (m *Status) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Status) XXX_Merge

func (m *Status) XXX_Merge(src proto.Message)

func (*Status) XXX_Size

func (m *Status) XXX_Size() int

func (*Status) XXX_Unmarshal

func (m *Status) XXX_Unmarshal(b []byte) error

type SyncContext added in v0.8.1

type SyncContext struct {
	Seq uint64

	PeerID PeerID

	BestNo   BlockNo
	TargetNo BlockNo //sync target blockno

	CommonAncestor *Block

	TotalCnt   uint64
	RemainCnt  uint64
	LastAnchor BlockNo

	NotifyC chan error
}

func NewSyncCtx added in v0.8.1

func NewSyncCtx(seq uint64, peerID PeerID, targetNo uint64, bestNo uint64, notifyC chan error) *SyncContext

func (*SyncContext) SetAncestor added in v0.8.1

func (ctx *SyncContext) SetAncestor(ancestor *Block)

type Transaction added in v0.9.0

type Transaction interface {
	GetTx() *Tx
	GetBody() *TxBody
	GetHash() []byte
	CalculateTxHash() []byte
	Validate([]byte) error
	ValidateWithSenderState(senderState *State) error
	HasVerifedAccount() bool
	GetVerifedAccount() Address
	SetVerifedAccount(account Address) bool
	RemoveVerifedAccount() bool
	GetMaxFee() *big.Int
}

func NewTransaction added in v0.9.0

func NewTransaction(tx *Tx) Transaction

type Tx

type Tx struct {
	Hash                 []byte   `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	Body                 *TxBody  `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func NewTx

func NewTx() *Tx

func (*Tx) CalculateTxHash

func (tx *Tx) CalculateTxHash() []byte

func (*Tx) Clone

func (tx *Tx) Clone() *Tx

func (*Tx) Descriptor

func (*Tx) Descriptor() ([]byte, []int)

func (*Tx) GetBody

func (m *Tx) GetBody() *TxBody

func (*Tx) GetHash

func (m *Tx) GetHash() []byte

func (*Tx) HasNameAccount added in v0.9.0

func (tx *Tx) HasNameAccount() bool

func (*Tx) HasNameRecipient added in v0.9.0

func (tx *Tx) HasNameRecipient() bool

func (*Tx) NeedNameVerify added in v0.9.0

func (tx *Tx) NeedNameVerify() bool

func (*Tx) ProtoMessage

func (*Tx) ProtoMessage()

func (*Tx) Reset

func (m *Tx) Reset()

func (*Tx) String

func (m *Tx) String() string

func (*Tx) ValidateWithContractState

func (tx *Tx) ValidateWithContractState(contractState *State) error

TODO : refoctor after ContractState move to types

func (*Tx) XXX_DiscardUnknown

func (m *Tx) XXX_DiscardUnknown()

func (*Tx) XXX_Marshal

func (m *Tx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Tx) XXX_Merge

func (m *Tx) XXX_Merge(src proto.Message)

func (*Tx) XXX_Size

func (m *Tx) XXX_Size() int

func (*Tx) XXX_Unmarshal

func (m *Tx) XXX_Unmarshal(b []byte) error

type TxBody

type TxBody struct {
	Nonce                uint64   `protobuf:"varint,1,opt,name=nonce,proto3" json:"nonce,omitempty"`
	Account              []byte   `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"`
	Recipient            []byte   `protobuf:"bytes,3,opt,name=recipient,proto3" json:"recipient,omitempty"`
	Amount               []byte   `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"`
	Payload              []byte   `protobuf:"bytes,5,opt,name=payload,proto3" json:"payload,omitempty"`
	GasLimit             uint64   `protobuf:"varint,6,opt,name=gasLimit,proto3" json:"gasLimit,omitempty"`
	GasPrice             []byte   `protobuf:"bytes,7,opt,name=gasPrice,proto3" json:"gasPrice,omitempty"`
	Type                 TxType   `protobuf:"varint,8,opt,name=type,proto3,enum=types.TxType" json:"type,omitempty"`
	ChainIdHash          []byte   `protobuf:"bytes,9,opt,name=chainIdHash,proto3" json:"chainIdHash,omitempty"`
	Sign                 []byte   `protobuf:"bytes,10,opt,name=sign,proto3" json:"sign,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*TxBody) Descriptor

func (*TxBody) Descriptor() ([]byte, []int)

func (*TxBody) GetAccount

func (m *TxBody) GetAccount() []byte

func (*TxBody) GetAmount

func (m *TxBody) GetAmount() []byte

func (*TxBody) GetAmountBigInt added in v0.8.2

func (b *TxBody) GetAmountBigInt() *big.Int

func (*TxBody) GetChainIdHash added in v0.9.0

func (m *TxBody) GetChainIdHash() []byte

func (*TxBody) GetGasLimit added in v0.9.0

func (m *TxBody) GetGasLimit() uint64

func (*TxBody) GetGasPrice added in v0.9.0

func (m *TxBody) GetGasPrice() []byte

func (*TxBody) GetGasPriceBigInt added in v0.9.0

func (b *TxBody) GetGasPriceBigInt() *big.Int

func (*TxBody) GetNonce

func (m *TxBody) GetNonce() uint64

func (*TxBody) GetPayload

func (m *TxBody) GetPayload() []byte

func (*TxBody) GetRecipient

func (m *TxBody) GetRecipient() []byte

func (*TxBody) GetSign

func (m *TxBody) GetSign() []byte

func (*TxBody) GetType

func (m *TxBody) GetType() TxType

func (*TxBody) ProtoMessage

func (*TxBody) ProtoMessage()

func (*TxBody) Reset

func (m *TxBody) Reset()

func (*TxBody) String

func (m *TxBody) String() string

func (*TxBody) XXX_DiscardUnknown

func (m *TxBody) XXX_DiscardUnknown()

func (*TxBody) XXX_Marshal

func (m *TxBody) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TxBody) XXX_Merge

func (m *TxBody) XXX_Merge(src proto.Message)

func (*TxBody) XXX_Size

func (m *TxBody) XXX_Size() int

func (*TxBody) XXX_Unmarshal

func (m *TxBody) XXX_Unmarshal(b []byte) error

type TxHash added in v0.9.0

type TxHash = []byte

type TxID

type TxID HashID

TxID is a HashID to identify a transaction

func ParseToTxID added in v0.9.0

func ParseToTxID(txHash []byte) (TxID, error)

ParseToTxID parse TxID from bytes. it return error if length of parameter is not fit.

func ToTxID

func ToTxID(txHash []byte) TxID

ToTxID make a TxID from bytes

func (TxID) String

func (id TxID) String() string

type TxIdx

type TxIdx struct {
	BlockHash            []byte   `protobuf:"bytes,1,opt,name=blockHash,proto3" json:"blockHash,omitempty"`
	Idx                  int32    `protobuf:"varint,2,opt,name=idx,proto3" json:"idx,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

TxIdx specifies a transaction's block hash and index within the block body

func (*TxIdx) Descriptor

func (*TxIdx) Descriptor() ([]byte, []int)

func (*TxIdx) GetBlockHash

func (m *TxIdx) GetBlockHash() []byte

func (*TxIdx) GetIdx

func (m *TxIdx) GetIdx() int32

func (*TxIdx) ProtoMessage

func (*TxIdx) ProtoMessage()

func (*TxIdx) Reset

func (m *TxIdx) Reset()

func (*TxIdx) String

func (m *TxIdx) String() string

func (*TxIdx) XXX_DiscardUnknown

func (m *TxIdx) XXX_DiscardUnknown()

func (*TxIdx) XXX_Marshal

func (m *TxIdx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TxIdx) XXX_Merge

func (m *TxIdx) XXX_Merge(src proto.Message)

func (*TxIdx) XXX_Size

func (m *TxIdx) XXX_Size() int

func (*TxIdx) XXX_Unmarshal

func (m *TxIdx) XXX_Unmarshal(b []byte) error

type TxInBlock

type TxInBlock struct {
	TxIdx                *TxIdx   `protobuf:"bytes,1,opt,name=txIdx,proto3" json:"txIdx,omitempty"`
	Tx                   *Tx      `protobuf:"bytes,2,opt,name=tx,proto3" json:"tx,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*TxInBlock) Descriptor

func (*TxInBlock) Descriptor() ([]byte, []int)

func (*TxInBlock) GetTx

func (m *TxInBlock) GetTx() *Tx

func (*TxInBlock) GetTxIdx

func (m *TxInBlock) GetTxIdx() *TxIdx

func (*TxInBlock) ProtoMessage

func (*TxInBlock) ProtoMessage()

func (*TxInBlock) Reset

func (m *TxInBlock) Reset()

func (*TxInBlock) String

func (m *TxInBlock) String() string

func (*TxInBlock) XXX_DiscardUnknown

func (m *TxInBlock) XXX_DiscardUnknown()

func (*TxInBlock) XXX_Marshal

func (m *TxInBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TxInBlock) XXX_Merge

func (m *TxInBlock) XXX_Merge(src proto.Message)

func (*TxInBlock) XXX_Size

func (m *TxInBlock) XXX_Size() int

func (*TxInBlock) XXX_Unmarshal

func (m *TxInBlock) XXX_Unmarshal(b []byte) error

type TxList

type TxList struct {
	Txs                  []*Tx    `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*TxList) Descriptor

func (*TxList) Descriptor() ([]byte, []int)

func (*TxList) GetTxs

func (m *TxList) GetTxs() []*Tx

func (*TxList) ProtoMessage

func (*TxList) ProtoMessage()

func (*TxList) Reset

func (m *TxList) Reset()

func (*TxList) String

func (m *TxList) String() string

func (*TxList) XXX_DiscardUnknown

func (m *TxList) XXX_DiscardUnknown()

func (*TxList) XXX_Marshal

func (m *TxList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TxList) XXX_Merge

func (m *TxList) XXX_Merge(src proto.Message)

func (*TxList) XXX_Size

func (m *TxList) XXX_Size() int

func (*TxList) XXX_Unmarshal

func (m *TxList) XXX_Unmarshal(b []byte) error

type TxType

type TxType int32
const (
	TxType_NORMAL     TxType = 0
	TxType_GOVERNANCE TxType = 1
)

func (TxType) EnumDescriptor

func (TxType) EnumDescriptor() ([]byte, []int)

func (TxType) String

func (x TxType) String() string

type VerifyResult

type VerifyResult struct {
	Tx                   *Tx          `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"`
	Error                VerifyStatus `protobuf:"varint,2,opt,name=error,proto3,enum=types.VerifyStatus" json:"error,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*VerifyResult) Descriptor

func (*VerifyResult) Descriptor() ([]byte, []int)

func (*VerifyResult) GetError

func (m *VerifyResult) GetError() VerifyStatus

func (*VerifyResult) GetTx

func (m *VerifyResult) GetTx() *Tx

func (*VerifyResult) ProtoMessage

func (*VerifyResult) ProtoMessage()

func (*VerifyResult) Reset

func (m *VerifyResult) Reset()

func (*VerifyResult) String

func (m *VerifyResult) String() string

func (*VerifyResult) XXX_DiscardUnknown

func (m *VerifyResult) XXX_DiscardUnknown()

func (*VerifyResult) XXX_Marshal

func (m *VerifyResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*VerifyResult) XXX_Merge

func (m *VerifyResult) XXX_Merge(src proto.Message)

func (*VerifyResult) XXX_Size

func (m *VerifyResult) XXX_Size() int

func (*VerifyResult) XXX_Unmarshal

func (m *VerifyResult) XXX_Unmarshal(b []byte) error

type VerifyStatus

type VerifyStatus int32
const (
	VerifyStatus_VERIFY_STATUS_OK             VerifyStatus = 0
	VerifyStatus_VERIFY_STATUS_SIGN_NOT_MATCH VerifyStatus = 1
	VerifyStatus_VERIFY_STATUS_INVALID_HASH   VerifyStatus = 2
)

func (VerifyStatus) EnumDescriptor

func (VerifyStatus) EnumDescriptor() ([]byte, []int)

func (VerifyStatus) String

func (x VerifyStatus) String() string

type Vote

type Vote struct {
	Candidate            []byte   `protobuf:"bytes,1,opt,name=candidate,proto3" json:"candidate,omitempty"`
	Amount               []byte   `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Vote) Descriptor

func (*Vote) Descriptor() ([]byte, []int)

func (*Vote) GetAmount

func (m *Vote) GetAmount() []byte

func (Vote) GetAmountBigInt added in v0.8.2

func (v Vote) GetAmountBigInt() *big.Int

func (*Vote) GetCandidate

func (m *Vote) GetCandidate() []byte

func (*Vote) ProtoMessage

func (*Vote) ProtoMessage()

func (*Vote) Reset

func (m *Vote) Reset()

func (*Vote) String

func (m *Vote) String() string

func (*Vote) XXX_DiscardUnknown

func (m *Vote) XXX_DiscardUnknown()

func (*Vote) XXX_Marshal

func (m *Vote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Vote) XXX_Merge

func (m *Vote) XXX_Merge(src proto.Message)

func (*Vote) XXX_Size

func (m *Vote) XXX_Size() int

func (*Vote) XXX_Unmarshal

func (m *Vote) XXX_Unmarshal(b []byte) error

type VoteInfo added in v0.9.0

type VoteInfo struct {
	Id                   string   `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	Candidates           []string `protobuf:"bytes,3,rep,name=candidates,proto3" json:"candidates,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*VoteInfo) Descriptor added in v0.9.0

func (*VoteInfo) Descriptor() ([]byte, []int)

func (*VoteInfo) GetCandidates added in v0.9.0

func (m *VoteInfo) GetCandidates() []string

func (*VoteInfo) GetId added in v0.9.0

func (m *VoteInfo) GetId() string

func (*VoteInfo) ProtoMessage added in v0.9.0

func (*VoteInfo) ProtoMessage()

func (*VoteInfo) Reset added in v0.9.0

func (m *VoteInfo) Reset()

func (*VoteInfo) String added in v0.9.0

func (m *VoteInfo) String() string

func (*VoteInfo) XXX_DiscardUnknown added in v0.9.0

func (m *VoteInfo) XXX_DiscardUnknown()

func (*VoteInfo) XXX_Marshal added in v0.9.0

func (m *VoteInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*VoteInfo) XXX_Merge added in v0.9.0

func (m *VoteInfo) XXX_Merge(src proto.Message)

func (*VoteInfo) XXX_Size added in v0.9.0

func (m *VoteInfo) XXX_Size() int

func (*VoteInfo) XXX_Unmarshal added in v0.9.0

func (m *VoteInfo) XXX_Unmarshal(b []byte) error

type VoteList

type VoteList struct {
	Votes                []*Vote  `protobuf:"bytes,1,rep,name=votes,proto3" json:"votes,omitempty"`
	Id                   string   `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*VoteList) Descriptor

func (*VoteList) Descriptor() ([]byte, []int)

func (*VoteList) GetId added in v0.9.0

func (m *VoteList) GetId() string

func (*VoteList) GetVotes

func (m *VoteList) GetVotes() []*Vote

func (VoteList) Len

func (vl VoteList) Len() int

func (VoteList) Less

func (vl VoteList) Less(i, j int) bool

func (*VoteList) ProtoMessage

func (*VoteList) ProtoMessage()

func (*VoteList) Reset

func (m *VoteList) Reset()

func (*VoteList) String

func (m *VoteList) String() string

func (VoteList) Swap

func (vl VoteList) Swap(i, j int)

func (*VoteList) XXX_DiscardUnknown

func (m *VoteList) XXX_DiscardUnknown()

func (*VoteList) XXX_Marshal

func (m *VoteList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*VoteList) XXX_Merge

func (m *VoteList) XXX_Merge(src proto.Message)

func (*VoteList) XXX_Size

func (m *VoteList) XXX_Size() int

func (*VoteList) XXX_Unmarshal

func (m *VoteList) XXX_Unmarshal(b []byte) error

type VoteParams added in v0.9.0

type VoteParams struct {
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Count                uint32   `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*VoteParams) Descriptor added in v0.9.0

func (*VoteParams) Descriptor() ([]byte, []int)

func (*VoteParams) GetCount added in v0.9.0

func (m *VoteParams) GetCount() uint32

func (*VoteParams) GetId added in v0.9.0

func (m *VoteParams) GetId() string

func (*VoteParams) ProtoMessage added in v0.9.0

func (*VoteParams) ProtoMessage()

func (*VoteParams) Reset added in v0.9.0

func (m *VoteParams) Reset()

func (*VoteParams) String added in v0.9.0

func (m *VoteParams) String() string

func (*VoteParams) XXX_DiscardUnknown added in v0.9.0

func (m *VoteParams) XXX_DiscardUnknown()

func (*VoteParams) XXX_Marshal added in v0.9.0

func (m *VoteParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*VoteParams) XXX_Merge added in v0.9.0

func (m *VoteParams) XXX_Merge(src proto.Message)

func (*VoteParams) XXX_Size added in v0.9.0

func (m *VoteParams) XXX_Size() int

func (*VoteParams) XXX_Unmarshal added in v0.9.0

func (m *VoteParams) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL