types

package
v2.4.9-gm Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2023 License: MIT Imports: 43 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AdminRPCService_MempoolTxStat_FullMethodName = "/types.AdminRPCService/MempoolTxStat"
	AdminRPCService_MempoolTx_FullMethodName     = "/types.AdminRPCService/MempoolTx"
)
View Source
const (
	// DefaultMaxBlockSize is the maximum block size (currently 1MiB)
	DefaultMaxBlockSize = 1 << 20
	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 (
	InvalidAddrType = 0
	AddrTypeIP4     = multiaddr.P_IP4
	AddrTypeIP6     = multiaddr.P_IP6
	AddrTypeDNS4    = multiaddr.P_DNS4
	AddrTypeDNS6    = multiaddr.P_DNS6
)
View Source
const (
	LogChainID    = "chain_id"
	LogBlkHash    = "blk_hash"
	LogBlkNo      = "blk_no"
	LogRespStatus = "status"
	LogHasNext    = "has_next"
)
View Source
const (
	PolarisRPCService_NodeState_FullMethodName     = "/types.PolarisRPCService/NodeState"
	PolarisRPCService_Metric_FullMethodName        = "/types.PolarisRPCService/Metric"
	PolarisRPCService_CurrentList_FullMethodName   = "/types.PolarisRPCService/CurrentList"
	PolarisRPCService_WhiteList_FullMethodName     = "/types.PolarisRPCService/WhiteList"
	PolarisRPCService_BlackList_FullMethodName     = "/types.PolarisRPCService/BlackList"
	PolarisRPCService_ListBLEntries_FullMethodName = "/types.PolarisRPCService/ListBLEntries"
	PolarisRPCService_AddBLEntry_FullMethodName    = "/types.PolarisRPCService/AddBLEntry"
	PolarisRPCService_RemoveBLEntry_FullMethodName = "/types.PolarisRPCService/RemoveBLEntry"
)
View Source
const (
	AergoRPCService_NodeState_FullMethodName               = "/types.AergoRPCService/NodeState"
	AergoRPCService_Metric_FullMethodName                  = "/types.AergoRPCService/Metric"
	AergoRPCService_Blockchain_FullMethodName              = "/types.AergoRPCService/Blockchain"
	AergoRPCService_GetChainInfo_FullMethodName            = "/types.AergoRPCService/GetChainInfo"
	AergoRPCService_ChainStat_FullMethodName               = "/types.AergoRPCService/ChainStat"
	AergoRPCService_ListBlockHeaders_FullMethodName        = "/types.AergoRPCService/ListBlockHeaders"
	AergoRPCService_ListBlockMetadata_FullMethodName       = "/types.AergoRPCService/ListBlockMetadata"
	AergoRPCService_ListBlockStream_FullMethodName         = "/types.AergoRPCService/ListBlockStream"
	AergoRPCService_ListBlockMetadataStream_FullMethodName = "/types.AergoRPCService/ListBlockMetadataStream"
	AergoRPCService_GetBlock_FullMethodName                = "/types.AergoRPCService/GetBlock"
	AergoRPCService_GetBlockMetadata_FullMethodName        = "/types.AergoRPCService/GetBlockMetadata"
	AergoRPCService_GetBlockBody_FullMethodName            = "/types.AergoRPCService/GetBlockBody"
	AergoRPCService_GetTX_FullMethodName                   = "/types.AergoRPCService/GetTX"
	AergoRPCService_GetBlockTX_FullMethodName              = "/types.AergoRPCService/GetBlockTX"
	AergoRPCService_GetReceipt_FullMethodName              = "/types.AergoRPCService/GetReceipt"
	AergoRPCService_GetABI_FullMethodName                  = "/types.AergoRPCService/GetABI"
	AergoRPCService_SendTX_FullMethodName                  = "/types.AergoRPCService/SendTX"
	AergoRPCService_SignTX_FullMethodName                  = "/types.AergoRPCService/SignTX"
	AergoRPCService_VerifyTX_FullMethodName                = "/types.AergoRPCService/VerifyTX"
	AergoRPCService_CommitTX_FullMethodName                = "/types.AergoRPCService/CommitTX"
	AergoRPCService_GetState_FullMethodName                = "/types.AergoRPCService/GetState"
	AergoRPCService_GetStateAndProof_FullMethodName        = "/types.AergoRPCService/GetStateAndProof"
	AergoRPCService_CreateAccount_FullMethodName           = "/types.AergoRPCService/CreateAccount"
	AergoRPCService_GetAccounts_FullMethodName             = "/types.AergoRPCService/GetAccounts"
	AergoRPCService_LockAccount_FullMethodName             = "/types.AergoRPCService/LockAccount"
	AergoRPCService_UnlockAccount_FullMethodName           = "/types.AergoRPCService/UnlockAccount"
	AergoRPCService_ImportAccount_FullMethodName           = "/types.AergoRPCService/ImportAccount"
	AergoRPCService_ExportAccount_FullMethodName           = "/types.AergoRPCService/ExportAccount"
	AergoRPCService_ExportAccountKeystore_FullMethodName   = "/types.AergoRPCService/ExportAccountKeystore"
	AergoRPCService_QueryContract_FullMethodName           = "/types.AergoRPCService/QueryContract"
	AergoRPCService_QueryContractState_FullMethodName      = "/types.AergoRPCService/QueryContractState"
	AergoRPCService_GetPeers_FullMethodName                = "/types.AergoRPCService/GetPeers"
	AergoRPCService_GetVotes_FullMethodName                = "/types.AergoRPCService/GetVotes"
	AergoRPCService_GetAccountVotes_FullMethodName         = "/types.AergoRPCService/GetAccountVotes"
	AergoRPCService_GetStaking_FullMethodName              = "/types.AergoRPCService/GetStaking"
	AergoRPCService_GetNameInfo_FullMethodName             = "/types.AergoRPCService/GetNameInfo"
	AergoRPCService_ListEventStream_FullMethodName         = "/types.AergoRPCService/ListEventStream"
	AergoRPCService_ListEvents_FullMethodName              = "/types.AergoRPCService/ListEvents"
	AergoRPCService_GetServerInfo_FullMethodName           = "/types.AergoRPCService/GetServerInfo"
	AergoRPCService_GetConsensusInfo_FullMethodName        = "/types.AergoRPCService/GetConsensusInfo"
	AergoRPCService_GetEnterpriseConfig_FullMethodName     = "/types.AergoRPCService/GetEnterpriseConfig"
	AergoRPCService_GetConfChangeProgress_FullMethodName   = "/types.AergoRPCService/GetConfChangeProgress"
)
View Source
const (
	AergoSystem     = "aergo.system"
	AergoName       = "aergo.name"
	AergoEnterprise = "aergo.enterprise"
	AergoVault      = "aergo.vault" // For community reward program (i.e. voting reward)

	MaxCandidates = 30
)
View Source
const AddressLength = 33
View Source
const AddressVersion = 0x42
View Source
const (
	// sending aergo to wrong recipient
	B23994084_001 = "85QfFtU62ihqj3LnoiKpZgfpKg8mixKRJ5EBMCHKVPGN"
)
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 NotSpecifiedID = PeerID("")
View Source
const PortUndefined = uint32(0xffffffff)
View Source
const PrivKeyVersion = 0xAA
View Source
const SetContractOwner = "v1setOwner"
View Source
const TxMaxSize = 200 * 1024

Variables

View Source
var (
	MembershipChangeType_name = map[int32]string{
		0: "ADD_MEMBER",
		1: "REMOVE_MEMBER",
	}
	MembershipChangeType_value = map[string]int32{
		"ADD_MEMBER":    0,
		"REMOVE_MEMBER": 1,
	}
)

Enum value maps for MembershipChangeType.

View Source
var (
	ConfChangeState_name = map[int32]string{
		0: "CONF_CHANGE_STATE_PROPOSED",
		1: "CONF_CHANGE_STATE_SAVED",
		2: "CONF_CHANGE_STATE_APPLIED",
	}
	ConfChangeState_value = map[string]int32{
		"CONF_CHANGE_STATE_PROPOSED": 0,
		"CONF_CHANGE_STATE_SAVED":    1,
		"CONF_CHANGE_STATE_APPLIED":  2,
	}
)

Enum value maps for ConfChangeState.

View Source
var (
	DefaultVerifierCnt = int(math.Max(float64(runtime.NumCPU()/2), float64(1)))
	DefaultAvgTimeSize = 60 * 60 * 24
	AvgTxVerifyTime    = NewAvgTime(DefaultAvgTimeSize)
	// MaxAER is maximum value of aergo
	MaxAER *big.Int
	// StakingMinimum is minimum amount for staking
	StakingMinimum *big.Int
	// ProposalPrice is default value of creating proposal
	ProposalPrice *big.Int
)
View Source
var (
	TxType_name = map[int32]string{
		0: "NORMAL",
		1: "GOVERNANCE",
		2: "REDEPLOY",
		3: "FEEDELEGATION",
		4: "TRANSFER",
		5: "CALL",
		6: "DEPLOY",
	}
	TxType_value = map[string]int32{
		"NORMAL":        0,
		"GOVERNANCE":    1,
		"REDEPLOY":      2,
		"FEEDELEGATION": 3,
		"TRANSFER":      4,
		"CALL":          5,
		"DEPLOY":        6,
	}
)

Enum value maps for TxType.

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")

	ErrTxNotAllowedAccount = errors.New("tx not allowed 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")

	ErrTxOnlySupportedInPriv = errors.New("tx only supported in private")

	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")

	ErrCreatorNotMatch = errors.New("creator not matched")

	ErrNotAllowedFeeDelegation = errors.New("fee delegation is not allowed")

	ErrNotEnoughGas = errors.New("not enough gas")
)
View Source
var (
	InvalidEntryErr     = errors.New("invalid entry format")
	InvalidPeerIDErr    = errors.New("invalid peerID format")
	InvalidAddrRangeErr = errors.New("invalid address format")
	InvalidStateErr     = errors.New("either one of address or cidr is allowed")
)
View Source
var (
	MetricType_name = map[int32]string{
		0: "NOTHING",
		1: "P2P_NETWORK",
	}
	MetricType_value = map[string]int32{
		"NOTHING":     0,
		"P2P_NETWORK": 1,
	}
)

Enum value maps for MetricType.

View Source
var (
	PeerRole_name = map[int32]string{
		0: "LegacyVersion",
		1: "Producer",
		2: "Watcher",
		3: "Agent",
	}
	PeerRole_value = map[string]int32{
		"LegacyVersion": 0,
		"Producer":      1,
		"Watcher":       2,
		"Agent":         3,
	}
)

Enum value maps for PeerRole.

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",
	}
	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,
	}
)

Enum value maps for ResultStatus.

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",
	}
	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,
	}
)

Enum value maps for CommitStatus.

View Source
var (
	VerifyStatus_name = map[int32]string{
		0: "VERIFY_STATUS_OK",
		1: "VERIFY_STATUS_SIGN_NOT_MATCH",
		2: "VERIFY_STATUS_INVALID_HASH",
	}
	VerifyStatus_value = map[string]int32{
		"VERIFY_STATUS_OK":             0,
		"VERIFY_STATUS_SIGN_NOT_MATCH": 1,
		"VERIFY_STATUS_INVALID_HASH":   2,
	}
)

Enum value maps for VerifyStatus.

View Source
var AdminRPCService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "types.AdminRPCService",
	HandlerType: (*AdminRPCServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "MempoolTxStat",
			Handler:    _AdminRPCService_MempoolTxStat_Handler,
		},
		{
			MethodName: "MempoolTx",
			Handler:    _AdminRPCService_MempoolTx_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "admin.proto",
}

AdminRPCService_ServiceDesc is the grpc.ServiceDesc for AdminRPCService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var AergoRPCService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "types.AergoRPCService",
	HandlerType: (*AergoRPCServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "NodeState",
			Handler:    _AergoRPCService_NodeState_Handler,
		},
		{
			MethodName: "Metric",
			Handler:    _AergoRPCService_Metric_Handler,
		},
		{
			MethodName: "Blockchain",
			Handler:    _AergoRPCService_Blockchain_Handler,
		},
		{
			MethodName: "GetChainInfo",
			Handler:    _AergoRPCService_GetChainInfo_Handler,
		},
		{
			MethodName: "ChainStat",
			Handler:    _AergoRPCService_ChainStat_Handler,
		},
		{
			MethodName: "ListBlockHeaders",
			Handler:    _AergoRPCService_ListBlockHeaders_Handler,
		},
		{
			MethodName: "ListBlockMetadata",
			Handler:    _AergoRPCService_ListBlockMetadata_Handler,
		},
		{
			MethodName: "GetBlock",
			Handler:    _AergoRPCService_GetBlock_Handler,
		},
		{
			MethodName: "GetBlockMetadata",
			Handler:    _AergoRPCService_GetBlockMetadata_Handler,
		},
		{
			MethodName: "GetBlockBody",
			Handler:    _AergoRPCService_GetBlockBody_Handler,
		},
		{
			MethodName: "GetTX",
			Handler:    _AergoRPCService_GetTX_Handler,
		},
		{
			MethodName: "GetBlockTX",
			Handler:    _AergoRPCService_GetBlockTX_Handler,
		},
		{
			MethodName: "GetReceipt",
			Handler:    _AergoRPCService_GetReceipt_Handler,
		},
		{
			MethodName: "GetABI",
			Handler:    _AergoRPCService_GetABI_Handler,
		},
		{
			MethodName: "SendTX",
			Handler:    _AergoRPCService_SendTX_Handler,
		},
		{
			MethodName: "SignTX",
			Handler:    _AergoRPCService_SignTX_Handler,
		},
		{
			MethodName: "VerifyTX",
			Handler:    _AergoRPCService_VerifyTX_Handler,
		},
		{
			MethodName: "CommitTX",
			Handler:    _AergoRPCService_CommitTX_Handler,
		},
		{
			MethodName: "GetState",
			Handler:    _AergoRPCService_GetState_Handler,
		},
		{
			MethodName: "GetStateAndProof",
			Handler:    _AergoRPCService_GetStateAndProof_Handler,
		},
		{
			MethodName: "CreateAccount",
			Handler:    _AergoRPCService_CreateAccount_Handler,
		},
		{
			MethodName: "GetAccounts",
			Handler:    _AergoRPCService_GetAccounts_Handler,
		},
		{
			MethodName: "LockAccount",
			Handler:    _AergoRPCService_LockAccount_Handler,
		},
		{
			MethodName: "UnlockAccount",
			Handler:    _AergoRPCService_UnlockAccount_Handler,
		},
		{
			MethodName: "ImportAccount",
			Handler:    _AergoRPCService_ImportAccount_Handler,
		},
		{
			MethodName: "ExportAccount",
			Handler:    _AergoRPCService_ExportAccount_Handler,
		},
		{
			MethodName: "ExportAccountKeystore",
			Handler:    _AergoRPCService_ExportAccountKeystore_Handler,
		},
		{
			MethodName: "QueryContract",
			Handler:    _AergoRPCService_QueryContract_Handler,
		},
		{
			MethodName: "QueryContractState",
			Handler:    _AergoRPCService_QueryContractState_Handler,
		},
		{
			MethodName: "GetPeers",
			Handler:    _AergoRPCService_GetPeers_Handler,
		},
		{
			MethodName: "GetVotes",
			Handler:    _AergoRPCService_GetVotes_Handler,
		},
		{
			MethodName: "GetAccountVotes",
			Handler:    _AergoRPCService_GetAccountVotes_Handler,
		},
		{
			MethodName: "GetStaking",
			Handler:    _AergoRPCService_GetStaking_Handler,
		},
		{
			MethodName: "GetNameInfo",
			Handler:    _AergoRPCService_GetNameInfo_Handler,
		},
		{
			MethodName: "ListEvents",
			Handler:    _AergoRPCService_ListEvents_Handler,
		},
		{
			MethodName: "GetServerInfo",
			Handler:    _AergoRPCService_GetServerInfo_Handler,
		},
		{
			MethodName: "GetConsensusInfo",
			Handler:    _AergoRPCService_GetConsensusInfo_Handler,
		},
		{
			MethodName: "GetEnterpriseConfig",
			Handler:    _AergoRPCService_GetEnterpriseConfig_Handler,
		},
		{
			MethodName: "GetConfChangeProgress",
			Handler:    _AergoRPCService_GetConfChangeProgress_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ListBlockStream",
			Handler:       _AergoRPCService_ListBlockStream_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "ListBlockMetadataStream",
			Handler:       _AergoRPCService_ListBlockMetadataStream_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "ListEventStream",
			Handler:       _AergoRPCService_ListEventStream_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "rpc.proto",
}

AergoRPCService_ServiceDesc is the grpc.ServiceDesc for AergoRPCService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var EmptyBlockHeaderInfo = &BlockHeaderInfo{}
View Source
var ErrInvalidIPAddress = errors.New("invalid ip address")
View Source
var ErrInvalidPort = errors.New("invalid port")
View Source
var File_account_proto protoreflect.FileDescriptor
View Source
var File_admin_proto protoreflect.FileDescriptor
View Source
var File_aergo_raft_proto protoreflect.FileDescriptor
View Source
var File_blockchain_proto protoreflect.FileDescriptor
View Source
var File_metric_proto protoreflect.FileDescriptor
View Source
var File_polarrpc_proto protoreflect.FileDescriptor
View Source
var InvalidArgument = errors.New("invalid argument")
View Source
var MainNetGenesis = "" /* 1892-byte string literal not displayed */
View Source
var PolarisRPCService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "types.PolarisRPCService",
	HandlerType: (*PolarisRPCServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "NodeState",
			Handler:    _PolarisRPCService_NodeState_Handler,
		},
		{
			MethodName: "Metric",
			Handler:    _PolarisRPCService_Metric_Handler,
		},
		{
			MethodName: "CurrentList",
			Handler:    _PolarisRPCService_CurrentList_Handler,
		},
		{
			MethodName: "WhiteList",
			Handler:    _PolarisRPCService_WhiteList_Handler,
		},
		{
			MethodName: "BlackList",
			Handler:    _PolarisRPCService_BlackList_Handler,
		},
		{
			MethodName: "ListBLEntries",
			Handler:    _PolarisRPCService_ListBLEntries_Handler,
		},
		{
			MethodName: "AddBLEntry",
			Handler:    _PolarisRPCService_AddBLEntry_Handler,
		},
		{
			MethodName: "RemoveBLEntry",
			Handler:    _PolarisRPCService_RemoveBLEntry_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "polarrpc.proto",
}

PolarisRPCService_ServiceDesc is the grpc.ServiceDesc for PolarisRPCService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var RPCErrInternalError = errors.New("internal error")
View Source
var RPCErrInvalidArgument = errors.New("invalid argument")
View Source
var TestNetGenesis = "" /* 1834-byte string literal not displayed */

Functions

func AddressFromMultiAddr

func AddressFromMultiAddr(ma Multiaddr) string

AddressFromMultiAddr returns address (ip4, ip6 or full qualified domain name)

func AddressOrigin

func AddressOrigin(addr []byte) []byte

func AddressPadding

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 BlockSizeHardLimit

func BlockSizeHardLimit() uint32

BlockSizeHardLimit returns the hard limit for block size

func BytesToUint64

func BytesToUint64(data []byte) uint64

func CalculateTxsRootHash

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

CalculateTxsRootHash generates merkle tree of transactions and returns root hash.

func ChainIdEqualWithoutVersion

func ChainIdEqualWithoutVersion(a, b []byte) bool

func ChainIdVersion

func ChainIdVersion(v int32) []byte

func Clone

func Clone(i interface{}) interface{}

func DecodeB58

func DecodeB58(sb string) []byte

func DecodeB64

func DecodeB64(sb string) []byte

func DecodeChainIdVersion

func DecodeChainIdVersion(cid []byte) int32

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 GetIPFromMultiaddr

func GetIPFromMultiaddr(ma Multiaddr) net.IP

func GetIPPortFromMultiaddr

func GetIPPortFromMultiaddr(ma Multiaddr) (net.IP, uint32, error)

func GetMaxMessageSize

func GetMaxMessageSize(blockSize uint32) uint32

GetMaxMessageSize returns the max message size corresponding to a specific block size (blockSize).

func GetPortFromMultiaddr

func GetPortFromMultiaddr(ma Multiaddr) uint32

func IDB58Encode

func IDB58Encode(pid PeerID) string

func InitGovernance

func InitGovernance(consensus string, isPublic bool)

func IsAddress

func IsAddress(proto multiaddr.Protocol) bool

func IsQuirkTx

func IsQuirkTx(txHash []byte) bool

IsQuirkTx checks if the tx should be handled specially.

func IsSamePeerID

func IsSamePeerID(pid1, pid2 PeerID) bool

func IsSpecialAccount

func IsSpecialAccount(name []byte) bool

IsSpecialAccount check if name is the one of special account names.

func MakeChainId

func MakeChainId(cid []byte, v int32) []byte

func MaxMessageSize

func MaxMessageSize() uint32

MaxMessageSize returns the limit for network message (client-server, p2p) size

func NewAmount

func NewAmount(amount uint64, unit TokenUnit) *big.Int

func NewZeroAmount

func NewZeroAmount() *big.Int

func RaftConfChangeToString

func RaftConfChangeToString(cc *raftpb.ConfChange) string

func RaftEntryToString

func RaftEntryToString(entry *raftpb.Entry) string

func RaftHardStateToString

func RaftHardStateToString(hardstate raftpb.HardState) string

func RegisterAdminRPCServiceServer

func RegisterAdminRPCServiceServer(s grpc.ServiceRegistrar, srv AdminRPCServiceServer)

func RegisterAergoRPCServiceServer

func RegisterAergoRPCServiceServer(s grpc.ServiceRegistrar, srv AergoRPCServiceServer)

func RegisterPolarisRPCServiceServer

func RegisterPolarisRPCServiceServer(s grpc.ServiceRegistrar, srv PolarisRPCServiceServer)

func ToAddress

func ToAddress(addr string) []byte

ToAddress return byte array of given base58check encoded address string

func Uint64ToBytes

func Uint64ToBytes(num uint64) []byte

func Uint64ToHexaString

func Uint64ToHexaString(id uint64) string

func ValidateSystemTx

func ValidateSystemTx(tx *TxBody) error

func WriteEntries

func WriteEntries(entries []WhiteListEntry, wr io.Writer) 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"`
	// contains filtered or unexported fields
}

func (*ABI) Descriptor deprecated

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

Deprecated: Use ABI.ProtoReflect.Descriptor instead.

func (*ABI) GetFunctions

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

func (*ABI) GetLanguage

func (x *ABI) GetLanguage() string

func (*ABI) GetStateVariables

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

func (*ABI) GetVersion

func (x *ABI) GetVersion() string

func (*ABI) HasFunction

func (abi *ABI) HasFunction(name string) bool

HasFunction returns if a function with the given name exists in the ABI definition

func (*ABI) ProtoMessage

func (*ABI) ProtoMessage()

func (*ABI) ProtoReflect added in v2.4.8

func (x *ABI) ProtoReflect() protoreflect.Message

func (*ABI) Reset

func (x *ABI) Reset()

func (*ABI) String

func (x *ABI) String() string

type Account

type Account struct {
	Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

func NewAccount

func NewAccount(addr []byte) *Account

NewAccount alloc new account object

func (*Account) Descriptor deprecated

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

Deprecated: Use Account.ProtoReflect.Descriptor instead.

func (*Account) GetAddress

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

func (*Account) ProtoMessage

func (*Account) ProtoMessage()

func (*Account) ProtoReflect added in v2.4.8

func (x *Account) ProtoReflect() protoreflect.Message

func (*Account) Reset

func (x *Account) Reset()

func (*Account) String

func (x *Account) String() string

func (*Account) ToString

func (a *Account) ToString() string

ToString return base58check encoded string of address

type AccountAddress

type AccountAddress struct {
	Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*AccountAddress) Descriptor deprecated

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

Deprecated: Use AccountAddress.ProtoReflect.Descriptor instead.

func (*AccountAddress) GetValue

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

func (*AccountAddress) ProtoMessage

func (*AccountAddress) ProtoMessage()

func (*AccountAddress) ProtoReflect added in v2.4.8

func (x *AccountAddress) ProtoReflect() protoreflect.Message

func (*AccountAddress) Reset

func (x *AccountAddress) Reset()

func (*AccountAddress) String

func (x *AccountAddress) String() string

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"`
	// contains filtered or unexported fields
}

func (*AccountAndRoot) Descriptor deprecated

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

Deprecated: Use AccountAndRoot.ProtoReflect.Descriptor instead.

func (*AccountAndRoot) GetAccount

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

func (*AccountAndRoot) GetCompressed

func (x *AccountAndRoot) GetCompressed() bool

func (*AccountAndRoot) GetRoot

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

func (*AccountAndRoot) ProtoMessage

func (*AccountAndRoot) ProtoMessage()

func (*AccountAndRoot) ProtoReflect added in v2.4.8

func (x *AccountAndRoot) ProtoReflect() protoreflect.Message

func (*AccountAndRoot) Reset

func (x *AccountAndRoot) Reset()

func (*AccountAndRoot) String

func (x *AccountAndRoot) String() string

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"`
	// contains filtered or unexported fields
}

func NewAccountList

func NewAccountList(accounts []*Account) *AccountList

NewAccountList alloc new account list

func (*AccountList) Descriptor deprecated

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

Deprecated: Use AccountList.ProtoReflect.Descriptor instead.

func (*AccountList) GetAccounts

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

func (*AccountList) ProtoMessage

func (*AccountList) ProtoMessage()

func (*AccountList) ProtoReflect added in v2.4.8

func (x *AccountList) ProtoReflect() protoreflect.Message

func (*AccountList) Reset

func (x *AccountList) Reset()

func (*AccountList) String

func (x *AccountList) String() string

type AccountProof

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"`
	// contains filtered or unexported fields
}

func (*AccountProof) Descriptor deprecated

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

Deprecated: Use AccountProof.ProtoReflect.Descriptor instead.

func (*AccountProof) GetAuditPath

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

func (*AccountProof) GetBitmap

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

func (*AccountProof) GetHeight

func (x *AccountProof) GetHeight() uint32

func (*AccountProof) GetInclusion

func (x *AccountProof) GetInclusion() bool

func (*AccountProof) GetKey

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

func (*AccountProof) GetProofKey

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

func (*AccountProof) GetProofVal

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

func (*AccountProof) GetState

func (x *AccountProof) GetState() *State

func (*AccountProof) ProtoMessage

func (*AccountProof) ProtoMessage()

func (*AccountProof) ProtoReflect added in v2.4.8

func (x *AccountProof) ProtoReflect() protoreflect.Message

func (*AccountProof) Reset

func (x *AccountProof) Reset()

func (*AccountProof) String

func (x *AccountProof) String() string

type AccountVoteInfo

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"`
	// contains filtered or unexported fields
}

func (*AccountVoteInfo) Descriptor deprecated

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

Deprecated: Use AccountVoteInfo.ProtoReflect.Descriptor instead.

func (*AccountVoteInfo) GetStaking

func (x *AccountVoteInfo) GetStaking() *Staking

func (*AccountVoteInfo) GetVoting

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

func (*AccountVoteInfo) ProtoMessage

func (*AccountVoteInfo) ProtoMessage()

func (*AccountVoteInfo) ProtoReflect added in v2.4.8

func (x *AccountVoteInfo) ProtoReflect() protoreflect.Message

func (*AccountVoteInfo) Reset

func (x *AccountVoteInfo) Reset()

func (*AccountVoteInfo) String

func (x *AccountVoteInfo) String() string

type AddEntryParams

type AddEntryParams struct {
	PeerID  string `protobuf:"bytes,1,opt,name=peerID,proto3" json:"peerID,omitempty"`
	Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	Cidr    string `protobuf:"bytes,3,opt,name=cidr,proto3" json:"cidr,omitempty"`
	// contains filtered or unexported fields
}

func (*AddEntryParams) Descriptor deprecated

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

Deprecated: Use AddEntryParams.ProtoReflect.Descriptor instead.

func (*AddEntryParams) GetAddress

func (x *AddEntryParams) GetAddress() string

func (*AddEntryParams) GetCidr

func (x *AddEntryParams) GetCidr() string

func (*AddEntryParams) GetPeerID

func (x *AddEntryParams) GetPeerID() string

func (*AddEntryParams) ProtoMessage

func (*AddEntryParams) ProtoMessage()

func (*AddEntryParams) ProtoReflect added in v2.4.8

func (x *AddEntryParams) ProtoReflect() protoreflect.Message

func (*AddEntryParams) Reset

func (x *AddEntryParams) Reset()

func (*AddEntryParams) String

func (x *AddEntryParams) String() string

type AddrType

type AddrType int

type Address

type Address = []byte

func DecodeAddress

func DecodeAddress(encodedAddr string) (Address, error)

func DecodeAddressBytes

func DecodeAddressBytes(decodedBytes []byte) (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"`
	// contains filtered or unexported fields
}

func (*AddressesRequest) Descriptor deprecated

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

Deprecated: Use AddressesRequest.ProtoReflect.Descriptor instead.

func (*AddressesRequest) GetMaxSize

func (x *AddressesRequest) GetMaxSize() uint32

func (*AddressesRequest) GetSender

func (x *AddressesRequest) GetSender() *PeerAddress

func (*AddressesRequest) ProtoMessage

func (*AddressesRequest) ProtoMessage()

func (*AddressesRequest) ProtoReflect added in v2.4.8

func (x *AddressesRequest) ProtoReflect() protoreflect.Message

func (*AddressesRequest) Reset

func (x *AddressesRequest) Reset()

func (*AddressesRequest) String

func (x *AddressesRequest) String() string

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"`
	// contains filtered or unexported fields
}

func (*AddressesResponse) Descriptor deprecated

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

Deprecated: Use AddressesResponse.ProtoReflect.Descriptor instead.

func (*AddressesResponse) GetPeers

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

func (*AddressesResponse) GetStatus

func (x *AddressesResponse) GetStatus() ResultStatus

func (*AddressesResponse) MarshalZerologObject

func (m *AddressesResponse) MarshalZerologObject(e *zerolog.Event)

func (*AddressesResponse) ProtoMessage

func (*AddressesResponse) ProtoMessage()

func (*AddressesResponse) ProtoReflect added in v2.4.8

func (x *AddressesResponse) ProtoReflect() protoreflect.Message

func (*AddressesResponse) Reset

func (x *AddressesResponse) Reset()

func (*AddressesResponse) String

func (x *AddressesResponse) String() string

type AdminRPCServiceClient

type AdminRPCServiceClient interface {
	// Returns the TX-relasted statistics of the current mempool.
	MempoolTxStat(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*SingleBytes, error)
	// Returns the TX-relasted statistics of the current mempool.
	MempoolTx(ctx context.Context, in *AccountList, opts ...grpc.CallOption) (*SingleBytes, error)
}

AdminRPCServiceClient is the client API for AdminRPCService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type AdminRPCServiceServer

type AdminRPCServiceServer interface {
	// Returns the TX-relasted statistics of the current mempool.
	MempoolTxStat(context.Context, *Empty) (*SingleBytes, error)
	// Returns the TX-relasted statistics of the current mempool.
	MempoolTx(context.Context, *AccountList) (*SingleBytes, error)
	// contains filtered or unexported methods
}

AdminRPCServiceServer is the server API for AdminRPCService service. All implementations must embed UnimplementedAdminRPCServiceServer for forward compatibility

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 as wif format
	ExportAccount(ctx context.Context, in *Personal, opts ...grpc.CallOption) (*SingleBytes, error)
	// Export account stored in this node as keystore format
	ExportAccountKeystore(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)
	// Returns enterprise config
	GetEnterpriseConfig(ctx context.Context, in *EnterpriseConfigKey, opts ...grpc.CallOption) (*EnterpriseConfig, error)
	// Return a status of changeCluster enterprise tx,  queried by requestID
	GetConfChangeProgress(ctx context.Context, in *SingleBytes, opts ...grpc.CallOption) (*ConfChangeProgress, error)
}

AergoRPCServiceClient is the client API for AergoRPCService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

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 as wif format
	ExportAccount(context.Context, *Personal) (*SingleBytes, error)
	// Export account stored in this node as keystore format
	ExportAccountKeystore(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)
	// Returns enterprise config
	GetEnterpriseConfig(context.Context, *EnterpriseConfigKey) (*EnterpriseConfig, error)
	// Return a status of changeCluster enterprise tx,  queried by requestID
	GetConfChangeProgress(context.Context, *SingleBytes) (*ConfChangeProgress, error)
	// contains filtered or unexported methods
}

AergoRPCServiceServer is the server API for AergoRPCService service. All implementations must embed UnimplementedAergoRPCServiceServer for forward compatibility

type AergoRPCService_ListBlockMetadataStreamClient

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

type AergoRPCService_ListBlockMetadataStreamServer

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

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

type AergoRPCService_ListEventStreamServer

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

type AgentCertificate

type AgentCertificate struct {
	CertVersion uint32 `protobuf:"varint,1,opt,name=certVersion,proto3" json:"certVersion,omitempty"`
	BPID        []byte `protobuf:"bytes,2,opt,name=BPID,proto3" json:"BPID,omitempty"`
	BPPubKey    []byte `protobuf:"bytes,3,opt,name=BPPubKey,proto3" json:"BPPubKey,omitempty"`
	// CreateTime is the number of nanoseconds elapsed since January 1, 1970 UTC
	CreateTime int64 `protobuf:"varint,4,opt,name=createTime,proto3" json:"createTime,omitempty"`
	// CreateTime is the number of nanoseconds elapsed since January 1, 1970 UTC
	ExpireTime   int64    `protobuf:"varint,5,opt,name=expireTime,proto3" json:"expireTime,omitempty"`
	AgentID      []byte   `protobuf:"bytes,6,opt,name=agentID,proto3" json:"agentID,omitempty"`
	AgentAddress [][]byte `protobuf:"bytes,7,rep,name=AgentAddress,proto3" json:"AgentAddress,omitempty"`
	Signature    []byte   `protobuf:"bytes,8,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

func (*AgentCertificate) Descriptor deprecated

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

Deprecated: Use AgentCertificate.ProtoReflect.Descriptor instead.

func (*AgentCertificate) GetAgentAddress

func (x *AgentCertificate) GetAgentAddress() [][]byte

func (*AgentCertificate) GetAgentID

func (x *AgentCertificate) GetAgentID() []byte

func (*AgentCertificate) GetBPID

func (x *AgentCertificate) GetBPID() []byte

func (*AgentCertificate) GetBPPubKey

func (x *AgentCertificate) GetBPPubKey() []byte

func (*AgentCertificate) GetCertVersion

func (x *AgentCertificate) GetCertVersion() uint32

func (*AgentCertificate) GetCreateTime

func (x *AgentCertificate) GetCreateTime() int64

func (*AgentCertificate) GetExpireTime

func (x *AgentCertificate) GetExpireTime() int64

func (*AgentCertificate) GetSignature

func (x *AgentCertificate) GetSignature() []byte

func (*AgentCertificate) ProtoMessage

func (*AgentCertificate) ProtoMessage()

func (*AgentCertificate) ProtoReflect added in v2.4.8

func (x *AgentCertificate) ProtoReflect() protoreflect.Message

func (*AgentCertificate) Reset

func (x *AgentCertificate) Reset()

func (*AgentCertificate) String

func (x *AgentCertificate) String() string

type ArgFilter

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

type AvgTime

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

func NewAvgTime

func NewAvgTime(sizeMavg int) *AvgTime

func (*AvgTime) Get

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

func (*AvgTime) UpdateAverage

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

type BLConfEntries

type BLConfEntries struct {
	Enabled bool     `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
	Entries []string `protobuf:"bytes,2,rep,name=entries,proto3" json:"entries,omitempty"`
	// contains filtered or unexported fields
}

func (*BLConfEntries) Descriptor deprecated

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

Deprecated: Use BLConfEntries.ProtoReflect.Descriptor instead.

func (*BLConfEntries) GetEnabled

func (x *BLConfEntries) GetEnabled() bool

func (*BLConfEntries) GetEntries

func (x *BLConfEntries) GetEntries() []string

func (*BLConfEntries) ProtoMessage

func (*BLConfEntries) ProtoMessage()

func (*BLConfEntries) ProtoReflect added in v2.4.8

func (x *BLConfEntries) ProtoReflect() protoreflect.Message

func (*BLConfEntries) Reset

func (x *BLConfEntries) Reset()

func (*BLConfEntries) String

func (x *BLConfEntries) String() string

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"`
	// contains filtered or unexported fields
}

func NewBlock

func NewBlock(bi *BlockHeaderInfo, blockRoot []byte, receipts *Receipts, txs []*Tx, coinbaseAcc []byte, consensus []byte) *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 deprecated

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

Deprecated: Use Block.ProtoReflect.Descriptor instead.

func (*Block) GetBody

func (x *Block) GetBody() *BlockBody

func (*Block) GetHash

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

func (*Block) GetHeader

func (x *Block) GetHeader() *BlockHeader

func (*Block) GetMetadata

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

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) ProtoReflect added in v2.4.8

func (x *Block) ProtoReflect() protoreflect.Message

func (*Block) Reset

func (x *Block) Reset()

func (*Block) SetBlocksRootHash

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

func (*Block) SetChainID

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

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 (x *Block) String() string

func (*Block) ValidChildOf

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.

type BlockBody

type BlockBody struct {
	Txs []*Tx `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"`
	// contains filtered or unexported fields
}

func (*BlockBody) Descriptor deprecated

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

Deprecated: Use BlockBody.ProtoReflect.Descriptor instead.

func (*BlockBody) GetTxs

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

func (*BlockBody) ProtoMessage

func (*BlockBody) ProtoMessage()

func (*BlockBody) ProtoReflect added in v2.4.8

func (x *BlockBody) ProtoReflect() protoreflect.Message

func (*BlockBody) Reset

func (x *BlockBody) Reset()

func (*BlockBody) String

func (x *BlockBody) String() string

type BlockBodyPaged

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"`
	// contains filtered or unexported fields
}

func (*BlockBodyPaged) Descriptor deprecated

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

Deprecated: Use BlockBodyPaged.ProtoReflect.Descriptor instead.

func (*BlockBodyPaged) GetBody

func (x *BlockBodyPaged) GetBody() *BlockBody

func (*BlockBodyPaged) GetOffset

func (x *BlockBodyPaged) GetOffset() uint32

func (*BlockBodyPaged) GetSize

func (x *BlockBodyPaged) GetSize() uint32

func (*BlockBodyPaged) GetTotal

func (x *BlockBodyPaged) GetTotal() uint32

func (*BlockBodyPaged) ProtoMessage

func (*BlockBodyPaged) ProtoMessage()

func (*BlockBodyPaged) ProtoReflect added in v2.4.8

func (x *BlockBodyPaged) ProtoReflect() protoreflect.Message

func (*BlockBodyPaged) Reset

func (x *BlockBodyPaged) Reset()

func (*BlockBodyPaged) String

func (x *BlockBodyPaged) String() string

type BlockBodyParams

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"`
	// contains filtered or unexported fields
}

func (*BlockBodyParams) Descriptor deprecated

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

Deprecated: Use BlockBodyParams.ProtoReflect.Descriptor instead.

func (*BlockBodyParams) GetHashornumber

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

func (*BlockBodyParams) GetPaging

func (x *BlockBodyParams) GetPaging() *PageParams

func (*BlockBodyParams) ProtoMessage

func (*BlockBodyParams) ProtoMessage()

func (*BlockBodyParams) ProtoReflect added in v2.4.8

func (x *BlockBodyParams) ProtoReflect() protoreflect.Message

func (*BlockBodyParams) Reset

func (x *BlockBodyParams) Reset()

func (*BlockBodyParams) String

func (x *BlockBodyParams) String() string

type BlockHeader

type BlockHeader struct {
	ChainID          []byte `protobuf:"bytes,1,opt,name=chainID,proto3" json:"chainID,omitempty"`                   // chain identifier
	PrevBlockHash    []byte `protobuf:"bytes,2,opt,name=prevBlockHash,proto3" json:"prevBlockHash,omitempty"`       // hash of previous block
	BlockNo          uint64 `protobuf:"varint,3,opt,name=blockNo,proto3" json:"blockNo,omitempty"`                  // block number
	Timestamp        int64  `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`              // block creation time stamp
	BlocksRootHash   []byte `protobuf:"bytes,5,opt,name=blocksRootHash,proto3" json:"blocksRootHash,omitempty"`     // hash of root of block merkle tree
	TxsRootHash      []byte `protobuf:"bytes,6,opt,name=txsRootHash,proto3" json:"txsRootHash,omitempty"`           // hash of root of transaction merkle tree
	ReceiptsRootHash []byte `protobuf:"bytes,7,opt,name=receiptsRootHash,proto3" json:"receiptsRootHash,omitempty"` // hash of root of receipt merkle tree
	Confirms         uint64 `protobuf:"varint,8,opt,name=confirms,proto3" json:"confirms,omitempty"`                // number of blocks this block is able to confirm
	PubKey           []byte `protobuf:"bytes,9,opt,name=pubKey,proto3" json:"pubKey,omitempty"`                     // block producer's public key
	CoinbaseAccount  []byte `protobuf:"bytes,10,opt,name=coinbaseAccount,proto3" json:"coinbaseAccount,omitempty"`  // address of account to receive fees
	Sign             []byte `protobuf:"bytes,11,opt,name=sign,proto3" json:"sign,omitempty"`                        // block producer's signature of BlockHeader
	Consensus        []byte `protobuf:"bytes,12,opt,name=consensus,proto3" json:"consensus,omitempty"`              // consensus meta
	// contains filtered or unexported fields
}

func (*BlockHeader) Descriptor deprecated

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

Deprecated: Use BlockHeader.ProtoReflect.Descriptor instead.

func (*BlockHeader) GetBlockNo

func (x *BlockHeader) GetBlockNo() uint64

func (*BlockHeader) GetBlocksRootHash

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

func (*BlockHeader) GetChainID

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

func (*BlockHeader) GetCoinbaseAccount

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

func (*BlockHeader) GetConfirms

func (x *BlockHeader) GetConfirms() uint64

func (*BlockHeader) GetConsensus

func (x *BlockHeader) GetConsensus() []byte

func (*BlockHeader) GetPrevBlockHash

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

func (*BlockHeader) GetPubKey

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

func (*BlockHeader) GetReceiptsRootHash

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

func (*BlockHeader) GetSign

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

func (*BlockHeader) GetTimestamp

func (x *BlockHeader) GetTimestamp() int64

func (*BlockHeader) GetTxsRootHash

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

func (*BlockHeader) ProtoMessage

func (*BlockHeader) ProtoMessage()

func (*BlockHeader) ProtoReflect added in v2.4.8

func (x *BlockHeader) ProtoReflect() protoreflect.Message

func (*BlockHeader) Reset

func (x *BlockHeader) Reset()

func (*BlockHeader) String

func (x *BlockHeader) String() string

type BlockHeaderInfo

type BlockHeaderInfo struct {
	No            BlockNo
	Ts            int64
	PrevBlockHash []byte
	ChainId       []byte
	ForkVersion   int32
}

func NewBlockHeaderInfo

func NewBlockHeaderInfo(b *Block) *BlockHeaderInfo

func NewBlockHeaderInfoFromPrevBlock

func NewBlockHeaderInfoFromPrevBlock(prev *Block, ts int64, bv BlockVersionner) *BlockHeaderInfo

func (*BlockHeaderInfo) ChainIdHash

func (b *BlockHeaderInfo) ChainIdHash() []byte

type BlockHeaderList

type BlockHeaderList struct {
	Blocks []*Block `protobuf:"bytes,1,rep,name=blocks,proto3" json:"blocks,omitempty"`
	// contains filtered or unexported fields
}

func (*BlockHeaderList) Descriptor deprecated

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

Deprecated: Use BlockHeaderList.ProtoReflect.Descriptor instead.

func (*BlockHeaderList) GetBlocks

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

func (*BlockHeaderList) ProtoMessage

func (*BlockHeaderList) ProtoMessage()

func (*BlockHeaderList) ProtoReflect added in v2.4.8

func (x *BlockHeaderList) ProtoReflect() protoreflect.Message

func (*BlockHeaderList) Reset

func (x *BlockHeaderList) Reset()

func (*BlockHeaderList) String

func (x *BlockHeaderList) String() string

type BlockID

type BlockID HashID

BlockID is a HashID to identify a block

func MustParseBlockID

func MustParseBlockID(blockHash []byte) BlockID

MustParseBlockID parse, it panics if parsing is failed.

func ParseToBlockID

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

type BlockInfo struct {
	Hash []byte
	No   BlockNo
}

BlockInfo is used for actor message to send block info

func (*BlockInfo) Equal

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

type BlockMetadata

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"` // blocksize in bytes
	// contains filtered or unexported fields
}

func (*BlockMetadata) Descriptor deprecated

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

Deprecated: Use BlockMetadata.ProtoReflect.Descriptor instead.

func (*BlockMetadata) GetHash

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

func (*BlockMetadata) GetHeader

func (x *BlockMetadata) GetHeader() *BlockHeader

func (*BlockMetadata) GetSize

func (x *BlockMetadata) GetSize() int64

func (*BlockMetadata) GetTxcount

func (x *BlockMetadata) GetTxcount() int32

func (*BlockMetadata) ProtoMessage

func (*BlockMetadata) ProtoMessage()

func (*BlockMetadata) ProtoReflect added in v2.4.8

func (x *BlockMetadata) ProtoReflect() protoreflect.Message

func (*BlockMetadata) Reset

func (x *BlockMetadata) Reset()

func (*BlockMetadata) String

func (x *BlockMetadata) String() string

type BlockMetadataList

type BlockMetadataList struct {
	Blocks []*BlockMetadata `protobuf:"bytes,1,rep,name=blocks,proto3" json:"blocks,omitempty"`
	// contains filtered or unexported fields
}

func (*BlockMetadataList) Descriptor deprecated

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

Deprecated: Use BlockMetadataList.ProtoReflect.Descriptor instead.

func (*BlockMetadataList) GetBlocks

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

func (*BlockMetadataList) ProtoMessage

func (*BlockMetadataList) ProtoMessage()

func (*BlockMetadataList) ProtoReflect added in v2.4.8

func (x *BlockMetadataList) ProtoReflect() protoreflect.Message

func (*BlockMetadataList) Reset

func (x *BlockMetadataList) Reset()

func (*BlockMetadataList) String

func (x *BlockMetadataList) String() string

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

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"`
	// contains filtered or unexported fields
}

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 deprecated

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

Deprecated: Use BlockProducedNotice.ProtoReflect.Descriptor instead.

func (*BlockProducedNotice) GetBlock

func (x *BlockProducedNotice) GetBlock() *Block

func (*BlockProducedNotice) GetBlockNo

func (x *BlockProducedNotice) GetBlockNo() uint64

func (*BlockProducedNotice) GetProducerID

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

func (*BlockProducedNotice) MarshalZerologObject

func (m *BlockProducedNotice) MarshalZerologObject(e *zerolog.Event)

func (*BlockProducedNotice) ProtoMessage

func (*BlockProducedNotice) ProtoMessage()

func (*BlockProducedNotice) ProtoReflect added in v2.4.8

func (x *BlockProducedNotice) ProtoReflect() protoreflect.Message

func (*BlockProducedNotice) Reset

func (x *BlockProducedNotice) Reset()

func (*BlockProducedNotice) String

func (x *BlockProducedNotice) String() string

type BlockVersionner

type BlockVersionner interface {
	Version(no BlockNo) int32
	IsV2Fork(BlockNo) bool
}

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"`
	ChainInfo       *ChainInfo `protobuf:"bytes,5,opt,name=chain_info,json=chainInfo,proto3" json:"chain_info,omitempty"`
	// contains filtered or unexported fields
}

BlockchainStatus is current status of blockchain

func (*BlockchainStatus) Descriptor deprecated

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

Deprecated: Use BlockchainStatus.ProtoReflect.Descriptor instead.

func (*BlockchainStatus) GetBestBlockHash

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

func (*BlockchainStatus) GetBestChainIdHash

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

func (*BlockchainStatus) GetBestHeight

func (x *BlockchainStatus) GetBestHeight() uint64

func (*BlockchainStatus) GetChainInfo

func (x *BlockchainStatus) GetChainInfo() *ChainInfo

func (*BlockchainStatus) GetConsensusInfo

func (x *BlockchainStatus) GetConsensusInfo() string

func (*BlockchainStatus) ProtoMessage

func (*BlockchainStatus) ProtoMessage()

func (*BlockchainStatus) ProtoReflect added in v2.4.8

func (x *BlockchainStatus) ProtoReflect() protoreflect.Message

func (*BlockchainStatus) Reset

func (x *BlockchainStatus) Reset()

func (*BlockchainStatus) String

func (x *BlockchainStatus) String() string

type CallInfo

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

type CertificateRenewedNotice

type CertificateRenewedNotice struct {
	Certificate *AgentCertificate `protobuf:"bytes,2,opt,name=certificate,proto3" json:"certificate,omitempty"`
	// contains filtered or unexported fields
}

CertificateRenewedNotice is sent when agent update hi certificate

func (*CertificateRenewedNotice) Descriptor deprecated

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

Deprecated: Use CertificateRenewedNotice.ProtoReflect.Descriptor instead.

func (*CertificateRenewedNotice) GetCertificate

func (x *CertificateRenewedNotice) GetCertificate() *AgentCertificate

func (*CertificateRenewedNotice) MarshalZerologObject

func (m *CertificateRenewedNotice) MarshalZerologObject(e *zerolog.Event)

func (*CertificateRenewedNotice) ProtoMessage

func (*CertificateRenewedNotice) ProtoMessage()

func (*CertificateRenewedNotice) ProtoReflect added in v2.4.8

func (x *CertificateRenewedNotice) ProtoReflect() protoreflect.Message

func (*CertificateRenewedNotice) Reset

func (x *CertificateRenewedNotice) Reset()

func (*CertificateRenewedNotice) String

func (x *CertificateRenewedNotice) String() string

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
	GetSystemValue(key SystemValue) (*big.Int, error)

	// GetEnterpriseConfig always return non-nil object if there is no error, but it can return EnterpriseConfig with empty values
	GetEnterpriseConfig(key string) (*EnterpriseConfig, error)
	ChainID(bno BlockNo) *ChainID
}

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

type ChainID

type ChainID struct {
	Version   int32  `json:"version"`
	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

func NewChainID() *ChainID

NewChainID returns a new ChainID initialized as nilChainID.

func (*ChainID) AsDefault

func (cid *ChainID) AsDefault()

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

func (*ChainID) Bytes

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

Bytes returns the binary representation of cid.

func (*ChainID) Equals

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

Equals reports whether cid equals rhs or not.

func (*ChainID) Read

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

Read deserialize data as a ChainID.

func (ChainID) ToJSON

func (cid ChainID) ToJSON() string

ToJSON returns a JSON encoded string of cid.

type ChainId

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"`
	Version   int32  `protobuf:"varint,5,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

func (*ChainId) Descriptor deprecated

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

Deprecated: Use ChainId.ProtoReflect.Descriptor instead.

func (*ChainId) GetConsensus

func (x *ChainId) GetConsensus() string

func (*ChainId) GetMagic

func (x *ChainId) GetMagic() string

func (*ChainId) GetMainnet

func (x *ChainId) GetMainnet() bool

func (*ChainId) GetPublic

func (x *ChainId) GetPublic() bool

func (*ChainId) GetVersion

func (x *ChainId) GetVersion() int32

func (*ChainId) ProtoMessage

func (*ChainId) ProtoMessage()

func (*ChainId) ProtoReflect added in v2.4.8

func (x *ChainId) ProtoReflect() protoreflect.Message

func (*ChainId) Reset

func (x *ChainId) Reset()

func (*ChainId) String

func (x *ChainId) String() string

type ChainInfo

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"`
	Totalvotingpower []byte   `protobuf:"bytes,9,opt,name=totalvotingpower,proto3" json:"totalvotingpower,omitempty"`
	Votingreward     []byte   `protobuf:"bytes,10,opt,name=votingreward,proto3" json:"votingreward,omitempty"`
	// contains filtered or unexported fields
}

ChainInfo returns chain configuration

func (*ChainInfo) Descriptor deprecated

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

Deprecated: Use ChainInfo.ProtoReflect.Descriptor instead.

func (*ChainInfo) GetBpNumber

func (x *ChainInfo) GetBpNumber() uint32

func (*ChainInfo) GetGasprice

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

func (*ChainInfo) GetId

func (x *ChainInfo) GetId() *ChainId

func (*ChainInfo) GetMaxblocksize

func (x *ChainInfo) GetMaxblocksize() uint64

func (*ChainInfo) GetMaxtokens

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

func (*ChainInfo) GetNameprice

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

func (*ChainInfo) GetStakingminimum

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

func (*ChainInfo) GetTotalstaking

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

func (*ChainInfo) GetTotalvotingpower

func (x *ChainInfo) GetTotalvotingpower() []byte

func (*ChainInfo) GetVotingreward

func (x *ChainInfo) GetVotingreward() []byte

func (*ChainInfo) ProtoMessage

func (*ChainInfo) ProtoMessage()

func (*ChainInfo) ProtoReflect added in v2.4.8

func (x *ChainInfo) ProtoReflect() protoreflect.Message

func (*ChainInfo) Reset

func (x *ChainInfo) Reset()

func (*ChainInfo) String

func (x *ChainInfo) String() string

type ChainStats

type ChainStats struct {
	Report string `protobuf:"bytes,1,opt,name=report,proto3" json:"report,omitempty"`
	// contains filtered or unexported fields
}

ChainStats corresponds to a chain statistics report.

func (*ChainStats) Descriptor deprecated

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

Deprecated: Use ChainStats.ProtoReflect.Descriptor instead.

func (*ChainStats) GetReport

func (x *ChainStats) GetReport() string

func (*ChainStats) ProtoMessage

func (*ChainStats) ProtoMessage()

func (*ChainStats) ProtoReflect added in v2.4.8

func (x *ChainStats) ProtoReflect() protoreflect.Message

func (*ChainStats) Reset

func (x *ChainStats) Reset()

func (*ChainStats) String

func (x *ChainStats) String() string

type ChangeClusterStatus

type ChangeClusterStatus struct {
	State   string        `json:"status"`
	Error   string        `json:"error"`
	Members []*MemberAttr `json:"members"`
}

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"`
	// contains filtered or unexported fields
}

func (*CommitResult) Descriptor deprecated

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

Deprecated: Use CommitResult.ProtoReflect.Descriptor instead.

func (*CommitResult) GetDetail

func (x *CommitResult) GetDetail() string

func (*CommitResult) GetError

func (x *CommitResult) GetError() CommitStatus

func (*CommitResult) GetHash

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

func (*CommitResult) ProtoMessage

func (*CommitResult) ProtoMessage()

func (*CommitResult) ProtoReflect added in v2.4.8

func (x *CommitResult) ProtoReflect() protoreflect.Message

func (*CommitResult) Reset

func (x *CommitResult) Reset()

func (*CommitResult) String

func (x *CommitResult) String() string

type CommitResultList

type CommitResultList struct {
	Results []*CommitResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
	// contains filtered or unexported fields
}

func (*CommitResultList) Descriptor deprecated

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

Deprecated: Use CommitResultList.ProtoReflect.Descriptor instead.

func (*CommitResultList) GetResults

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

func (*CommitResultList) ProtoMessage

func (*CommitResultList) ProtoMessage()

func (*CommitResultList) ProtoReflect added in v2.4.8

func (x *CommitResultList) ProtoReflect() protoreflect.Message

func (*CommitResultList) Reset

func (x *CommitResultList) Reset()

func (*CommitResultList) String

func (x *CommitResultList) String() string

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) Descriptor added in v2.4.8

func (CommitStatus) Enum added in v2.4.8

func (x CommitStatus) Enum() *CommitStatus

func (CommitStatus) EnumDescriptor deprecated

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

Deprecated: Use CommitStatus.Descriptor instead.

func (CommitStatus) Number added in v2.4.8

func (CommitStatus) String

func (x CommitStatus) String() string

func (CommitStatus) Type added in v2.4.8

type ConfChangeProgress

type ConfChangeProgress struct {
	State   ConfChangeState `protobuf:"varint,1,opt,name=State,proto3,enum=types.ConfChangeState" json:"State,omitempty"`
	Err     string          `protobuf:"bytes,2,opt,name=Err,proto3" json:"Err,omitempty"`
	Members []*MemberAttr   `protobuf:"bytes,3,rep,name=Members,proto3" json:"Members,omitempty"`
	// contains filtered or unexported fields
}

func (*ConfChangeProgress) Descriptor deprecated

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

Deprecated: Use ConfChangeProgress.ProtoReflect.Descriptor instead.

func (*ConfChangeProgress) GetErr

func (x *ConfChangeProgress) GetErr() string

func (*ConfChangeProgress) GetMembers

func (x *ConfChangeProgress) GetMembers() []*MemberAttr

func (*ConfChangeProgress) GetState

func (x *ConfChangeProgress) GetState() ConfChangeState

func (*ConfChangeProgress) ProtoMessage

func (*ConfChangeProgress) ProtoMessage()

func (*ConfChangeProgress) ProtoReflect added in v2.4.8

func (x *ConfChangeProgress) ProtoReflect() protoreflect.Message

func (*ConfChangeProgress) Reset

func (x *ConfChangeProgress) Reset()

func (*ConfChangeProgress) String

func (x *ConfChangeProgress) String() string

func (*ConfChangeProgress) ToPrintable

func (ccProgress *ConfChangeProgress) ToPrintable() *ChangeClusterStatus

func (*ConfChangeProgress) ToString

func (ccProgress *ConfChangeProgress) ToString() string

type ConfChangeState

type ConfChangeState int32
const (
	ConfChangeState_CONF_CHANGE_STATE_PROPOSED ConfChangeState = 0
	ConfChangeState_CONF_CHANGE_STATE_SAVED    ConfChangeState = 1
	ConfChangeState_CONF_CHANGE_STATE_APPLIED  ConfChangeState = 2
)

func (ConfChangeState) Descriptor added in v2.4.8

func (ConfChangeState) Enum added in v2.4.8

func (x ConfChangeState) Enum() *ConfChangeState

func (ConfChangeState) EnumDescriptor deprecated

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

Deprecated: Use ConfChangeState.Descriptor instead.

func (ConfChangeState) Number added in v2.4.8

func (ConfChangeState) String

func (x ConfChangeState) String() string

func (ConfChangeState) Type added in v2.4.8

type ConfigItem

type ConfigItem struct {
	Props map[string]string `` /* 151-byte string literal not displayed */
	// contains filtered or unexported fields
}

func AddCategory

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

func (*ConfigItem) Add

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

func (*ConfigItem) AddBool

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

func (*ConfigItem) AddFloat

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

func (*ConfigItem) AddInt

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

func (*ConfigItem) Descriptor deprecated

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

Deprecated: Use ConfigItem.ProtoReflect.Descriptor instead.

func (*ConfigItem) GetProps

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

func (*ConfigItem) ProtoMessage

func (*ConfigItem) ProtoMessage()

func (*ConfigItem) ProtoReflect added in v2.4.8

func (x *ConfigItem) ProtoReflect() protoreflect.Message

func (*ConfigItem) Reset

func (x *ConfigItem) Reset()

func (*ConfigItem) String

func (x *ConfigItem) String() string

type ConsensusInfo

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"`
	// contains filtered or unexported fields
}

info and bps is json string

func (*ConsensusInfo) Descriptor deprecated

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

Deprecated: Use ConsensusInfo.ProtoReflect.Descriptor instead.

func (*ConsensusInfo) GetBps

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

func (*ConsensusInfo) GetInfo

func (x *ConsensusInfo) GetInfo() string

func (*ConsensusInfo) GetType

func (x *ConsensusInfo) GetType() string

func (*ConsensusInfo) ProtoMessage

func (*ConsensusInfo) ProtoMessage()

func (*ConsensusInfo) ProtoReflect added in v2.4.8

func (x *ConsensusInfo) ProtoReflect() protoreflect.Message

func (*ConsensusInfo) Reset

func (x *ConsensusInfo) Reset()

func (*ConsensusInfo) String

func (x *ConsensusInfo) String() string

type ContractVarProof

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"`
	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"`
	Key       []byte   `protobuf:"bytes,9,opt,name=key,proto3" json:"key,omitempty"`
	// contains filtered or unexported fields
}

func (*ContractVarProof) Descriptor deprecated

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

Deprecated: Use ContractVarProof.ProtoReflect.Descriptor instead.

func (*ContractVarProof) GetAuditPath

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

func (*ContractVarProof) GetBitmap

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

func (*ContractVarProof) GetHeight

func (x *ContractVarProof) GetHeight() uint32

func (*ContractVarProof) GetInclusion

func (x *ContractVarProof) GetInclusion() bool

func (*ContractVarProof) GetKey

func (x *ContractVarProof) GetKey() []byte

func (*ContractVarProof) GetProofKey

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

func (*ContractVarProof) GetProofVal

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

func (*ContractVarProof) GetValue

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

func (*ContractVarProof) ProtoMessage

func (*ContractVarProof) ProtoMessage()

func (*ContractVarProof) ProtoReflect added in v2.4.8

func (x *ContractVarProof) ProtoReflect() protoreflect.Message

func (*ContractVarProof) Reset

func (x *ContractVarProof) Reset()

func (*ContractVarProof) String

func (x *ContractVarProof) String() string

type DummyBlockVersionner

type DummyBlockVersionner int32

func (DummyBlockVersionner) IsV2Fork

func (v DummyBlockVersionner) IsV2Fork(BlockNo) bool

func (DummyBlockVersionner) Version

func (v DummyBlockVersionner) Version(BlockNo) int32

type Empty

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

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect added in v2.4.8

func (x *Empty) ProtoReflect() protoreflect.Message

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type EnterpriseBP

type EnterpriseBP struct {
	Name string `json:"name"`
	// multiaddress format with ip or dns with port e.g. /ip4/123.45.67.89/tcp/7846
	Address string `json:"address"`
	PeerID  string `json:"peerid"`
}

type EnterpriseConfig

type EnterpriseConfig struct {
	Key    string   `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	On     bool     `protobuf:"varint,2,opt,name=on,proto3" json:"on,omitempty"`
	Values []string `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"`
	// contains filtered or unexported fields
}

func (*EnterpriseConfig) Descriptor deprecated

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

Deprecated: Use EnterpriseConfig.ProtoReflect.Descriptor instead.

func (*EnterpriseConfig) GetKey

func (x *EnterpriseConfig) GetKey() string

func (*EnterpriseConfig) GetOn

func (x *EnterpriseConfig) GetOn() bool

func (*EnterpriseConfig) GetValues

func (x *EnterpriseConfig) GetValues() []string

func (*EnterpriseConfig) ProtoMessage

func (*EnterpriseConfig) ProtoMessage()

func (*EnterpriseConfig) ProtoReflect added in v2.4.8

func (x *EnterpriseConfig) ProtoReflect() protoreflect.Message

func (*EnterpriseConfig) Reset

func (x *EnterpriseConfig) Reset()

func (*EnterpriseConfig) String

func (x *EnterpriseConfig) String() string

type EnterpriseConfigKey

type EnterpriseConfigKey struct {
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// contains filtered or unexported fields
}

func (*EnterpriseConfigKey) Descriptor deprecated

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

Deprecated: Use EnterpriseConfigKey.ProtoReflect.Descriptor instead.

func (*EnterpriseConfigKey) GetKey

func (x *EnterpriseConfigKey) GetKey() string

func (*EnterpriseConfigKey) ProtoMessage

func (*EnterpriseConfigKey) ProtoMessage()

func (*EnterpriseConfigKey) ProtoReflect added in v2.4.8

func (x *EnterpriseConfigKey) ProtoReflect() protoreflect.Message

func (*EnterpriseConfigKey) Reset

func (x *EnterpriseConfigKey) Reset()

func (*EnterpriseConfigKey) String

func (x *EnterpriseConfigKey) String() string

type EnterpriseTxStatus

type EnterpriseTxStatus struct {
	Status   string               `json:"status"`
	Ret      string               `json:"ret"`
	CCStatus *ChangeClusterStatus `json:"change_cluster,omitempty"`
}

type Event

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"`
	// contains filtered or unexported fields
}

func (*Event) Descriptor deprecated

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

Deprecated: Use Event.ProtoReflect.Descriptor instead.

func (*Event) Filter

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

func (*Event) GetBlockHash

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

func (*Event) GetBlockNo

func (x *Event) GetBlockNo() uint64

func (*Event) GetContractAddress

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

func (*Event) GetEventIdx

func (x *Event) GetEventIdx() int32

func (*Event) GetEventName

func (x *Event) GetEventName() string

func (*Event) GetJsonArgs

func (x *Event) GetJsonArgs() string

func (*Event) GetTxHash

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

func (*Event) GetTxIndex

func (x *Event) GetTxIndex() int32

func (*Event) MarshalBinary

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

func (*Event) MarshalJSON

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

func (*Event) MarshalMerkleBinary

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

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) ProtoReflect added in v2.4.8

func (x *Event) ProtoReflect() protoreflect.Message

func (*Event) Reset

func (x *Event) Reset()

func (*Event) SetMemoryInfo

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

func (*Event) String

func (x *Event) String() string

func (*Event) UnmarshalBinary

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

type EventList

type EventList struct {
	Events []*Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"`
	// contains filtered or unexported fields
}

func (*EventList) Descriptor deprecated

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

Deprecated: Use EventList.ProtoReflect.Descriptor instead.

func (*EventList) GetEvents

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

func (*EventList) ProtoMessage

func (*EventList) ProtoMessage()

func (*EventList) ProtoReflect added in v2.4.8

func (x *EventList) ProtoReflect() protoreflect.Message

func (*EventList) Reset

func (x *EventList) Reset()

func (*EventList) String

func (x *EventList) String() string

type FilterInfo

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"`
	// contains filtered or unexported fields
}

func (*FilterInfo) Descriptor deprecated

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

Deprecated: Use FilterInfo.ProtoReflect.Descriptor instead.

func (*FilterInfo) GetArgFilter

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

func (*FilterInfo) GetBlockfrom

func (x *FilterInfo) GetBlockfrom() uint64

func (*FilterInfo) GetBlockto

func (x *FilterInfo) GetBlockto() uint64

func (*FilterInfo) GetContractAddress

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

func (*FilterInfo) GetDesc

func (x *FilterInfo) GetDesc() bool

func (*FilterInfo) GetEventName

func (x *FilterInfo) GetEventName() string

func (*FilterInfo) GetExArgFilter

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

func (*FilterInfo) GetRecentBlockCnt

func (x *FilterInfo) GetRecentBlockCnt() int32

func (*FilterInfo) ProtoMessage

func (*FilterInfo) ProtoMessage()

func (*FilterInfo) ProtoReflect added in v2.4.8

func (x *FilterInfo) ProtoReflect() protoreflect.Message

func (*FilterInfo) Reset

func (x *FilterInfo) Reset()

func (*FilterInfo) String

func (x *FilterInfo) String() string

func (*FilterInfo) ValidateCheck

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

type FnArgument

type FnArgument struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*FnArgument) Descriptor deprecated

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

Deprecated: Use FnArgument.ProtoReflect.Descriptor instead.

func (*FnArgument) GetName

func (x *FnArgument) GetName() string

func (*FnArgument) ProtoMessage

func (*FnArgument) ProtoMessage()

func (*FnArgument) ProtoReflect added in v2.4.8

func (x *FnArgument) ProtoReflect() protoreflect.Message

func (*FnArgument) Reset

func (x *FnArgument) Reset()

func (*FnArgument) String

func (x *FnArgument) String() string

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"`
	FeeDelegation bool          `protobuf:"varint,5,opt,name=fee_delegation,json=feeDelegation,proto3" json:"fee_delegation,omitempty"`
	// contains filtered or unexported fields
}

func (*Function) Descriptor deprecated

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

Deprecated: Use Function.ProtoReflect.Descriptor instead.

func (*Function) GetArguments

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

func (*Function) GetFeeDelegation

func (x *Function) GetFeeDelegation() bool

func (*Function) GetName

func (x *Function) GetName() string

func (*Function) GetPayable

func (x *Function) GetPayable() bool

func (*Function) GetView

func (x *Function) GetView() bool

func (*Function) ProtoMessage

func (*Function) ProtoMessage()

func (*Function) ProtoReflect added in v2.4.8

func (x *Function) ProtoReflect() protoreflect.Message

func (*Function) Reset

func (x *Function) Reset()

func (*Function) String

func (x *Function) String() string

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"`
	EnterpriseBPs []EnterpriseBP    `json:"enterprise_bps,omitempty"`
	// contains filtered or unexported fields
}

Genesis represents genesis block

func GetDefaultGenesis

func GetDefaultGenesis() *Genesis

GetDefaultGenesis returns default genesis structure

func GetGenesisFromBytes

func GetGenesisFromBytes(b []byte) *Genesis

GetGenesisFromBytes decodes & return Genesis from b.

func GetMainNetGenesis

func GetMainNetGenesis() *Genesis

func GetTestGenesis

func GetTestGenesis() *Genesis

GetTestGenesis returns Gensis object for a unit test.

func GetTestNetGenesis

func GetTestNetGenesis() *Genesis

func (*Genesis) AddBalance

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

func (g Genesis) Bytes() []byte

Bytes returns byte-encoded BPs from g.

func (*Genesis) ChainID

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

ChainID returns the binary representation of g.ID.

func (Genesis) ConsensusType

func (g Genesis) ConsensusType() string

ConsensusType retruns g.ID.ConsensusType.

func (Genesis) HasDevChainID

func (g Genesis) HasDevChainID() bool

func (Genesis) HasPrivateChainID

func (g Genesis) HasPrivateChainID() bool

func (Genesis) IsAergoPublicChain

func (g Genesis) IsAergoPublicChain() bool

func (*Genesis) IsMainNet

func (g *Genesis) IsMainNet() bool

func (*Genesis) IsTestNet

func (g *Genesis) IsTestNet() bool

func (Genesis) PublicNet

func (g Genesis) PublicNet() bool

PublicNet reports whether g corresponds to PublicNet.

func (*Genesis) SetBlock

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

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

func (*Genesis) SetTotalBalance

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

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

func (*Genesis) TotalBalance

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

TotalBalance returns the total initial balance of the chain.

func (*Genesis) Validate

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

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"`
	// contains filtered or unexported fields
}

func (*GetAncestorRequest) Descriptor deprecated

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

Deprecated: Use GetAncestorRequest.ProtoReflect.Descriptor instead.

func (*GetAncestorRequest) GetHashes

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

func (*GetAncestorRequest) MarshalZerologObject

func (m *GetAncestorRequest) MarshalZerologObject(e *zerolog.Event)

func (*GetAncestorRequest) ProtoMessage

func (*GetAncestorRequest) ProtoMessage()

func (*GetAncestorRequest) ProtoReflect added in v2.4.8

func (x *GetAncestorRequest) ProtoReflect() protoreflect.Message

func (*GetAncestorRequest) Reset

func (x *GetAncestorRequest) Reset()

func (*GetAncestorRequest) String

func (x *GetAncestorRequest) String() string

type GetAncestorResponse

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"`
	// contains filtered or unexported fields
}

func (*GetAncestorResponse) Descriptor deprecated

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

Deprecated: Use GetAncestorResponse.ProtoReflect.Descriptor instead.

func (*GetAncestorResponse) GetAncestorHash

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

func (*GetAncestorResponse) GetAncestorNo

func (x *GetAncestorResponse) GetAncestorNo() uint64

func (*GetAncestorResponse) GetStatus

func (x *GetAncestorResponse) GetStatus() ResultStatus

func (*GetAncestorResponse) MarshalZerologObject

func (m *GetAncestorResponse) MarshalZerologObject(e *zerolog.Event)

func (*GetAncestorResponse) ProtoMessage

func (*GetAncestorResponse) ProtoMessage()

func (*GetAncestorResponse) ProtoReflect added in v2.4.8

func (x *GetAncestorResponse) ProtoReflect() protoreflect.Message

func (*GetAncestorResponse) Reset

func (x *GetAncestorResponse) Reset()

func (*GetAncestorResponse) String

func (x *GetAncestorResponse) String() string

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"`
	// contains filtered or unexported fields
}

GetBlockHeadersRequest

func (*GetBlockHeadersRequest) Descriptor deprecated

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

Deprecated: Use GetBlockHeadersRequest.ProtoReflect.Descriptor instead.

func (*GetBlockHeadersRequest) GetAsc

func (x *GetBlockHeadersRequest) GetAsc() bool

func (*GetBlockHeadersRequest) GetHash

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

func (*GetBlockHeadersRequest) GetHeight

func (x *GetBlockHeadersRequest) GetHeight() uint64

func (*GetBlockHeadersRequest) GetOffset

func (x *GetBlockHeadersRequest) GetOffset() uint64

func (*GetBlockHeadersRequest) GetSize

func (x *GetBlockHeadersRequest) GetSize() uint32

func (*GetBlockHeadersRequest) MarshalZerologObject

func (m *GetBlockHeadersRequest) MarshalZerologObject(e *zerolog.Event)

func (*GetBlockHeadersRequest) ProtoMessage

func (*GetBlockHeadersRequest) ProtoMessage()

func (*GetBlockHeadersRequest) ProtoReflect added in v2.4.8

func (x *GetBlockHeadersRequest) ProtoReflect() protoreflect.Message

func (*GetBlockHeadersRequest) Reset

func (x *GetBlockHeadersRequest) Reset()

func (*GetBlockHeadersRequest) String

func (x *GetBlockHeadersRequest) String() string

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"`
	// contains filtered or unexported fields
}

GetBlockResponse contains response of GetBlockRequest.

func (*GetBlockHeadersResponse) Descriptor deprecated

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

Deprecated: Use GetBlockHeadersResponse.ProtoReflect.Descriptor instead.

func (*GetBlockHeadersResponse) GetHasNext

func (x *GetBlockHeadersResponse) GetHasNext() bool

func (*GetBlockHeadersResponse) GetHashes

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

func (*GetBlockHeadersResponse) GetHeaders

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

func (*GetBlockHeadersResponse) GetStatus

func (x *GetBlockHeadersResponse) GetStatus() ResultStatus

func (*GetBlockHeadersResponse) MarshalZerologObject

func (m *GetBlockHeadersResponse) MarshalZerologObject(e *zerolog.Event)

func (*GetBlockHeadersResponse) ProtoMessage

func (*GetBlockHeadersResponse) ProtoMessage()

func (*GetBlockHeadersResponse) ProtoReflect added in v2.4.8

func (x *GetBlockHeadersResponse) ProtoReflect() protoreflect.Message

func (*GetBlockHeadersResponse) Reset

func (x *GetBlockHeadersResponse) Reset()

func (*GetBlockHeadersResponse) String

func (x *GetBlockHeadersResponse) String() string

type GetBlockRequest

type GetBlockRequest struct {
	Hashes [][]byte `protobuf:"bytes,1,rep,name=hashes,proto3" json:"hashes,omitempty"`
	// contains filtered or unexported fields
}

GetBlockRequest request blocks informations, not just single block.

func (*GetBlockRequest) Descriptor deprecated

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

Deprecated: Use GetBlockRequest.ProtoReflect.Descriptor instead.

func (*GetBlockRequest) GetHashes

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

func (*GetBlockRequest) MarshalZerologObject

func (m *GetBlockRequest) MarshalZerologObject(e *zerolog.Event)

func (*GetBlockRequest) ProtoMessage

func (*GetBlockRequest) ProtoMessage()

func (*GetBlockRequest) ProtoReflect added in v2.4.8

func (x *GetBlockRequest) ProtoReflect() protoreflect.Message

func (*GetBlockRequest) Reset

func (x *GetBlockRequest) Reset()

func (*GetBlockRequest) String

func (x *GetBlockRequest) String() string

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"`
	// contains filtered or unexported fields
}

GetBlockResponse contains response of GetBlockRequest.

func (*GetBlockResponse) Descriptor deprecated

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

Deprecated: Use GetBlockResponse.ProtoReflect.Descriptor instead.

func (*GetBlockResponse) GetBlocks

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

func (*GetBlockResponse) GetHasNext

func (x *GetBlockResponse) GetHasNext() bool

func (*GetBlockResponse) GetStatus

func (x *GetBlockResponse) GetStatus() ResultStatus

func (*GetBlockResponse) MarshalZerologObject

func (m *GetBlockResponse) MarshalZerologObject(e *zerolog.Event)

func (*GetBlockResponse) ProtoMessage

func (*GetBlockResponse) ProtoMessage()

func (*GetBlockResponse) ProtoReflect added in v2.4.8

func (x *GetBlockResponse) ProtoReflect() protoreflect.Message

func (*GetBlockResponse) Reset

func (x *GetBlockResponse) Reset()

func (*GetBlockResponse) String

func (x *GetBlockResponse) String() string

type GetClusterInfoRequest

type GetClusterInfoRequest struct {
	BestBlockHash []byte `protobuf:"bytes,1,opt,name=bestBlockHash,proto3" json:"bestBlockHash,omitempty"`
	// contains filtered or unexported fields
}

data types for raft support GetClusterInfoRequest

func (*GetClusterInfoRequest) Descriptor deprecated

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

Deprecated: Use GetClusterInfoRequest.ProtoReflect.Descriptor instead.

func (*GetClusterInfoRequest) GetBestBlockHash

func (x *GetClusterInfoRequest) GetBestBlockHash() []byte

func (*GetClusterInfoRequest) MarshalZerologObject

func (m *GetClusterInfoRequest) MarshalZerologObject(e *zerolog.Event)

func (*GetClusterInfoRequest) ProtoMessage

func (*GetClusterInfoRequest) ProtoMessage()

func (*GetClusterInfoRequest) ProtoReflect added in v2.4.8

func (x *GetClusterInfoRequest) ProtoReflect() protoreflect.Message

func (*GetClusterInfoRequest) Reset

func (x *GetClusterInfoRequest) Reset()

func (*GetClusterInfoRequest) String

func (x *GetClusterInfoRequest) String() string

type GetClusterInfoResponse

type GetClusterInfoResponse struct {
	ChainID       []byte         `protobuf:"bytes,1,opt,name=chainID,proto3" json:"chainID,omitempty"`
	ClusterID     uint64         `protobuf:"varint,2,opt,name=clusterID,proto3" json:"clusterID,omitempty"`
	Error         string         `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
	MbrAttrs      []*MemberAttr  `protobuf:"bytes,4,rep,name=mbrAttrs,proto3" json:"mbrAttrs,omitempty"`
	BestBlockNo   uint64         `protobuf:"varint,5,opt,name=bestBlockNo,proto3" json:"bestBlockNo,omitempty"`    // best block number of this node
	HardStateInfo *HardStateInfo `protobuf:"bytes,6,opt,name=hardStateInfo,proto3" json:"hardStateInfo,omitempty"` // hardstate corresponding to bestblockhash of requester
	// contains filtered or unexported fields
}

func (*GetClusterInfoResponse) Descriptor deprecated

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

Deprecated: Use GetClusterInfoResponse.ProtoReflect.Descriptor instead.

func (*GetClusterInfoResponse) GetBestBlockNo

func (x *GetClusterInfoResponse) GetBestBlockNo() uint64

func (*GetClusterInfoResponse) GetChainID

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

func (*GetClusterInfoResponse) GetClusterID

func (x *GetClusterInfoResponse) GetClusterID() uint64

func (*GetClusterInfoResponse) GetError

func (x *GetClusterInfoResponse) GetError() string

func (*GetClusterInfoResponse) GetHardStateInfo

func (x *GetClusterInfoResponse) GetHardStateInfo() *HardStateInfo

func (*GetClusterInfoResponse) GetMbrAttrs

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

func (*GetClusterInfoResponse) MarshalZerologObject

func (m *GetClusterInfoResponse) MarshalZerologObject(e *zerolog.Event)

func (*GetClusterInfoResponse) ProtoMessage

func (*GetClusterInfoResponse) ProtoMessage()

func (*GetClusterInfoResponse) ProtoReflect added in v2.4.8

func (x *GetClusterInfoResponse) ProtoReflect() protoreflect.Message

func (*GetClusterInfoResponse) Reset

func (x *GetClusterInfoResponse) Reset()

func (*GetClusterInfoResponse) String

func (x *GetClusterInfoResponse) String() string

type GetHashByNo

type GetHashByNo struct {
	BlockNo uint64 `protobuf:"varint,1,opt,name=blockNo,proto3" json:"blockNo,omitempty"`
	// contains filtered or unexported fields
}

func (*GetHashByNo) Descriptor deprecated

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

Deprecated: Use GetHashByNo.ProtoReflect.Descriptor instead.

func (*GetHashByNo) GetBlockNo

func (x *GetHashByNo) GetBlockNo() uint64

func (*GetHashByNo) MarshalZerologObject

func (m *GetHashByNo) MarshalZerologObject(e *zerolog.Event)

func (*GetHashByNo) ProtoMessage

func (*GetHashByNo) ProtoMessage()

func (*GetHashByNo) ProtoReflect added in v2.4.8

func (x *GetHashByNo) ProtoReflect() protoreflect.Message

func (*GetHashByNo) Reset

func (x *GetHashByNo) Reset()

func (*GetHashByNo) String

func (x *GetHashByNo) String() string

type GetHashByNoResponse

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"`
	// contains filtered or unexported fields
}

func (*GetHashByNoResponse) Descriptor deprecated

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

Deprecated: Use GetHashByNoResponse.ProtoReflect.Descriptor instead.

func (*GetHashByNoResponse) GetBlockHash

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

func (*GetHashByNoResponse) GetStatus

func (x *GetHashByNoResponse) GetStatus() ResultStatus

func (*GetHashByNoResponse) MarshalZerologObject

func (m *GetHashByNoResponse) MarshalZerologObject(e *zerolog.Event)

func (*GetHashByNoResponse) ProtoMessage

func (*GetHashByNoResponse) ProtoMessage()

func (*GetHashByNoResponse) ProtoReflect added in v2.4.8

func (x *GetHashByNoResponse) ProtoReflect() protoreflect.Message

func (*GetHashByNoResponse) Reset

func (x *GetHashByNoResponse) Reset()

func (*GetHashByNoResponse) String

func (x *GetHashByNoResponse) String() string

type GetHashesRequest

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"`
	// contains filtered or unexported fields
}

GetHashesRequest

func (*GetHashesRequest) Descriptor deprecated

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

Deprecated: Use GetHashesRequest.ProtoReflect.Descriptor instead.

func (*GetHashesRequest) GetPrevHash

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

func (*GetHashesRequest) GetPrevNumber

func (x *GetHashesRequest) GetPrevNumber() uint64

func (*GetHashesRequest) GetSize

func (x *GetHashesRequest) GetSize() uint64

func (*GetHashesRequest) MarshalZerologObject

func (m *GetHashesRequest) MarshalZerologObject(e *zerolog.Event)

func (*GetHashesRequest) ProtoMessage

func (*GetHashesRequest) ProtoMessage()

func (*GetHashesRequest) ProtoReflect added in v2.4.8

func (x *GetHashesRequest) ProtoReflect() protoreflect.Message

func (*GetHashesRequest) Reset

func (x *GetHashesRequest) Reset()

func (*GetHashesRequest) String

func (x *GetHashesRequest) String() string

type GetHashesResponse

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"`
	// contains filtered or unexported fields
}

GetHashesResponse contains response of GetHashesRequest.

func (*GetHashesResponse) Descriptor deprecated

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

Deprecated: Use GetHashesResponse.ProtoReflect.Descriptor instead.

func (*GetHashesResponse) GetHasNext

func (x *GetHashesResponse) GetHasNext() bool

func (*GetHashesResponse) GetHashes

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

func (*GetHashesResponse) GetStatus

func (x *GetHashesResponse) GetStatus() ResultStatus

func (*GetHashesResponse) MarshalZerologObject

func (m *GetHashesResponse) MarshalZerologObject(e *zerolog.Event)

func (*GetHashesResponse) ProtoMessage

func (*GetHashesResponse) ProtoMessage()

func (*GetHashesResponse) ProtoReflect added in v2.4.8

func (x *GetHashesResponse) ProtoReflect() protoreflect.Message

func (*GetHashesResponse) Reset

func (x *GetHashesResponse) Reset()

func (*GetHashesResponse) String

func (x *GetHashesResponse) String() string

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"`
	// contains filtered or unexported fields
}

GetMissingRequest

func (*GetMissingRequest) Descriptor deprecated

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

Deprecated: Use GetMissingRequest.ProtoReflect.Descriptor instead.

func (*GetMissingRequest) GetHashes

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

func (*GetMissingRequest) GetStophash

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

func (*GetMissingRequest) ProtoMessage

func (*GetMissingRequest) ProtoMessage()

func (*GetMissingRequest) ProtoReflect added in v2.4.8

func (x *GetMissingRequest) ProtoReflect() protoreflect.Message

func (*GetMissingRequest) Reset

func (x *GetMissingRequest) Reset()

func (*GetMissingRequest) String

func (x *GetMissingRequest) String() string

type GetTransactionsRequest

type GetTransactionsRequest struct {
	Hashes [][]byte `protobuf:"bytes,1,rep,name=hashes,proto3" json:"hashes,omitempty"`
	// contains filtered or unexported fields
}

func (*GetTransactionsRequest) Descriptor deprecated

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

Deprecated: Use GetTransactionsRequest.ProtoReflect.Descriptor instead.

func (*GetTransactionsRequest) GetHashes

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

func (*GetTransactionsRequest) MarshalZerologObject

func (m *GetTransactionsRequest) MarshalZerologObject(e *zerolog.Event)

func (*GetTransactionsRequest) ProtoMessage

func (*GetTransactionsRequest) ProtoMessage()

func (*GetTransactionsRequest) ProtoReflect added in v2.4.8

func (x *GetTransactionsRequest) ProtoReflect() protoreflect.Message

func (*GetTransactionsRequest) Reset

func (x *GetTransactionsRequest) Reset()

func (*GetTransactionsRequest) String

func (x *GetTransactionsRequest) String() string

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"`
	// contains filtered or unexported fields
}

func (*GetTransactionsResponse) Descriptor deprecated

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

Deprecated: Use GetTransactionsResponse.ProtoReflect.Descriptor instead.

func (*GetTransactionsResponse) GetHasNext

func (x *GetTransactionsResponse) GetHasNext() bool

func (*GetTransactionsResponse) GetHashes

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

func (*GetTransactionsResponse) GetStatus

func (x *GetTransactionsResponse) GetStatus() ResultStatus

func (*GetTransactionsResponse) GetTxs

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

func (*GetTransactionsResponse) MarshalZerologObject

func (m *GetTransactionsResponse) MarshalZerologObject(e *zerolog.Event)

func (*GetTransactionsResponse) ProtoMessage

func (*GetTransactionsResponse) ProtoMessage()

func (*GetTransactionsResponse) ProtoReflect added in v2.4.8

func (x *GetTransactionsResponse) ProtoReflect() protoreflect.Message

func (*GetTransactionsResponse) Reset

func (x *GetTransactionsResponse) Reset()

func (*GetTransactionsResponse) String

func (x *GetTransactionsResponse) String() string

type GoAwayNotice

type GoAwayNotice struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

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

func (*GoAwayNotice) Descriptor deprecated

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

Deprecated: Use GoAwayNotice.ProtoReflect.Descriptor instead.

func (*GoAwayNotice) GetMessage

func (x *GoAwayNotice) GetMessage() string

func (*GoAwayNotice) MarshalZerologObject

func (m *GoAwayNotice) MarshalZerologObject(e *zerolog.Event)

func (*GoAwayNotice) ProtoMessage

func (*GoAwayNotice) ProtoMessage()

func (*GoAwayNotice) ProtoReflect added in v2.4.8

func (x *GoAwayNotice) ProtoReflect() protoreflect.Message

func (*GoAwayNotice) Reset

func (x *GoAwayNotice) Reset()

func (*GoAwayNotice) String

func (x *GoAwayNotice) String() string

type HardStateInfo

type HardStateInfo struct {
	Term   uint64 `protobuf:"varint,1,opt,name=term,proto3" json:"term,omitempty"`
	Commit uint64 `protobuf:"varint,2,opt,name=commit,proto3" json:"commit,omitempty"`
	// contains filtered or unexported fields
}

func (*HardStateInfo) Descriptor deprecated

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

Deprecated: Use HardStateInfo.ProtoReflect.Descriptor instead.

func (*HardStateInfo) GetCommit

func (x *HardStateInfo) GetCommit() uint64

func (*HardStateInfo) GetTerm

func (x *HardStateInfo) GetTerm() uint64

func (*HardStateInfo) ProtoMessage

func (*HardStateInfo) ProtoMessage()

func (*HardStateInfo) ProtoReflect added in v2.4.8

func (x *HardStateInfo) ProtoReflect() protoreflect.Message

func (*HardStateInfo) Reset

func (x *HardStateInfo) Reset()

func (*HardStateInfo) String

func (x *HardStateInfo) String() string

func (*HardStateInfo) ToString

func (hs *HardStateInfo) ToString() string

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

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

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

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"`
	Keystore *SingleBytes `protobuf:"bytes,4,opt,name=keystore,proto3" json:"keystore,omitempty"`
	// contains filtered or unexported fields
}

func (*ImportFormat) Descriptor deprecated

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

Deprecated: Use ImportFormat.ProtoReflect.Descriptor instead.

func (*ImportFormat) GetKeystore

func (x *ImportFormat) GetKeystore() *SingleBytes

func (*ImportFormat) GetNewpass

func (x *ImportFormat) GetNewpass() string

func (*ImportFormat) GetOldpass

func (x *ImportFormat) GetOldpass() string

func (*ImportFormat) GetWif

func (x *ImportFormat) GetWif() *SingleBytes

func (*ImportFormat) ProtoMessage

func (*ImportFormat) ProtoMessage()

func (*ImportFormat) ProtoReflect added in v2.4.8

func (x *ImportFormat) ProtoReflect() protoreflect.Message

func (*ImportFormat) Reset

func (x *ImportFormat) Reset()

func (*ImportFormat) String

func (x *ImportFormat) String() string

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"`
	// contains filtered or unexported fields
}

func (*Input) Descriptor deprecated

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

Deprecated: Use Input.ProtoReflect.Descriptor instead.

func (*Input) GetAddress

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

func (*Input) GetHash

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

func (*Input) GetScript

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

func (*Input) GetValue

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

func (*Input) ProtoMessage

func (*Input) ProtoMessage()

func (*Input) ProtoReflect added in v2.4.8

func (x *Input) ProtoReflect() protoreflect.Message

func (*Input) Reset

func (x *Input) Reset()

func (*Input) String

func (x *Input) String() string

type InternalError

type InternalError struct {
	Reason string
}

func (*InternalError) Error

func (e *InternalError) Error() string

type IssueCertificateRequest

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

IssueCertificateRequest is message to block producer from agent

func (*IssueCertificateRequest) Descriptor deprecated

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

Deprecated: Use IssueCertificateRequest.ProtoReflect.Descriptor instead.

func (*IssueCertificateRequest) ProtoMessage

func (*IssueCertificateRequest) ProtoMessage()

func (*IssueCertificateRequest) ProtoReflect added in v2.4.8

func (x *IssueCertificateRequest) ProtoReflect() protoreflect.Message

func (*IssueCertificateRequest) Reset

func (x *IssueCertificateRequest) Reset()

func (*IssueCertificateRequest) String

func (x *IssueCertificateRequest) String() string

type IssueCertificateResponse

type IssueCertificateResponse struct {
	Status      ResultStatus      `protobuf:"varint,1,opt,name=status,proto3,enum=types.ResultStatus" json:"status,omitempty"`
	Certificate *AgentCertificate `protobuf:"bytes,2,opt,name=certificate,proto3" json:"certificate,omitempty"`
	// contains filtered or unexported fields
}

IssueCertificateResp is common message during handshake

func (*IssueCertificateResponse) Descriptor deprecated

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

Deprecated: Use IssueCertificateResponse.ProtoReflect.Descriptor instead.

func (*IssueCertificateResponse) GetCertificate

func (x *IssueCertificateResponse) GetCertificate() *AgentCertificate

func (*IssueCertificateResponse) GetStatus

func (x *IssueCertificateResponse) GetStatus() ResultStatus

func (*IssueCertificateResponse) MarshalZerologObject

func (m *IssueCertificateResponse) MarshalZerologObject(e *zerolog.Event)

func (*IssueCertificateResponse) ProtoMessage

func (*IssueCertificateResponse) ProtoMessage()

func (*IssueCertificateResponse) ProtoReflect added in v2.4.8

func (x *IssueCertificateResponse) ProtoReflect() protoreflect.Message

func (*IssueCertificateResponse) Reset

func (x *IssueCertificateResponse) Reset()

func (*IssueCertificateResponse) String

func (x *IssueCertificateResponse) String() string

type KeyParams

type KeyParams struct {
	Key []string `protobuf:"bytes,1,rep,name=key,proto3" json:"key,omitempty"`
	// contains filtered or unexported fields
}

func (*KeyParams) Descriptor deprecated

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

Deprecated: Use KeyParams.ProtoReflect.Descriptor instead.

func (*KeyParams) GetKey

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

func (*KeyParams) ProtoMessage

func (*KeyParams) ProtoMessage()

func (*KeyParams) ProtoReflect added in v2.4.8

func (x *KeyParams) ProtoReflect() protoreflect.Message

func (*KeyParams) Reset

func (x *KeyParams) Reset()

func (*KeyParams) String

func (x *KeyParams) String() string

type LastBlockStatus

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"`
	// contains filtered or unexported fields
}

func (*ListParams) Descriptor deprecated

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

Deprecated: Use ListParams.ProtoReflect.Descriptor instead.

func (*ListParams) GetAsc

func (x *ListParams) GetAsc() bool

func (*ListParams) GetHash

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

func (*ListParams) GetHeight

func (x *ListParams) GetHeight() uint64

func (*ListParams) GetOffset

func (x *ListParams) GetOffset() uint32

func (*ListParams) GetSize

func (x *ListParams) GetSize() uint32

func (*ListParams) ProtoMessage

func (*ListParams) ProtoMessage()

func (*ListParams) ProtoReflect added in v2.4.8

func (x *ListParams) ProtoReflect() protoreflect.Message

func (*ListParams) Reset

func (x *ListParams) Reset()

func (*ListParams) String

func (x *ListParams) String() string

type LogAddr added in v2.4.8

type LogAddr Address

LogAddr is thin wrapper which show base58 encoded form of wallet or smart contract

func (LogAddr) String added in v2.4.8

func (t LogAddr) String() string

type LogB58EncMarshaller

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

LogB58EncMarshaller is zerolog array marshaller which print bytes array to base58 encoded string.

func NewLogB58EncMarshaller

func NewLogB58EncMarshaller(arr [][]byte, limit int) *LogB58EncMarshaller

func (LogB58EncMarshaller) MarshalZerologArray

func (m LogB58EncMarshaller) MarshalZerologArray(a *zerolog.Array)

type LogBase58

type LogBase58 []byte

LogBase58 is thin wrapper which show base58 encoded string of byte array

func (LogBase58) String added in v2.4.8

func (t LogBase58) String() string

type LogBlockHashMarshaller

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

func (LogBlockHashMarshaller) MarshalZerologArray

func (m LogBlockHashMarshaller) MarshalZerologArray(a *zerolog.Array)

type LogPeerShort added in v2.4.8

type LogPeerShort PeerID

func (LogPeerShort) String added in v2.4.8

func (t LogPeerShort) String() string

type LogTrsactions

type LogTrsactions struct {
	TXs   []Transaction
	Limit int
}

func (LogTrsactions) MarshalZerologArray

func (l LogTrsactions) MarshalZerologArray(a *zerolog.Array)

type LogTx

type LogTx struct {
	*Tx
}

func (LogTx) MarshalZerologObject

func (t LogTx) MarshalZerologObject(e *zerolog.Event)

type LogTxHash

type LogTxHash struct {
	*Tx
}

func (LogTxHash) MarshalZerologObject

func (t LogTxHash) MarshalZerologObject(e *zerolog.Event)

type LogTxIDsMarshaller

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

func NewLogTxIDsMarshaller

func NewLogTxIDsMarshaller(arr []TxID, limit int) *LogTxIDsMarshaller

func (LogTxIDsMarshaller) MarshalZerologArray

func (m LogTxIDsMarshaller) MarshalZerologArray(a *zerolog.Array)

type MapQuery

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"`
	// contains filtered or unexported fields
}

query to polaris

func (*MapQuery) Descriptor deprecated

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

Deprecated: Use MapQuery.ProtoReflect.Descriptor instead.

func (*MapQuery) GetAddMe

func (x *MapQuery) GetAddMe() bool

func (*MapQuery) GetExcludes

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

func (*MapQuery) GetSize

func (x *MapQuery) GetSize() int32

func (*MapQuery) GetStatus

func (x *MapQuery) GetStatus() *Status

func (*MapQuery) ProtoMessage

func (*MapQuery) ProtoMessage()

func (*MapQuery) ProtoReflect added in v2.4.8

func (x *MapQuery) ProtoReflect() protoreflect.Message

func (*MapQuery) Reset

func (x *MapQuery) Reset()

func (*MapQuery) String

func (x *MapQuery) String() string

type MapResponse

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"`
	// contains filtered or unexported fields
}

func (*MapResponse) Descriptor deprecated

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

Deprecated: Use MapResponse.ProtoReflect.Descriptor instead.

func (*MapResponse) GetAddresses

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

func (*MapResponse) GetMessage

func (x *MapResponse) GetMessage() string

func (*MapResponse) GetStatus

func (x *MapResponse) GetStatus() ResultStatus

func (*MapResponse) ProtoMessage

func (*MapResponse) ProtoMessage()

func (*MapResponse) ProtoReflect added in v2.4.8

func (x *MapResponse) ProtoReflect() protoreflect.Message

func (*MapResponse) Reset

func (x *MapResponse) Reset()

func (*MapResponse) String

func (x *MapResponse) String() string

type MemberAttr

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"`
	Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
	PeerID  []byte `protobuf:"bytes,4,opt,name=peerID,proto3" json:"peerID,omitempty"`
	// contains filtered or unexported fields
}

func (*MemberAttr) Descriptor deprecated

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

Deprecated: Use MemberAttr.ProtoReflect.Descriptor instead.

func (*MemberAttr) GetAddress

func (x *MemberAttr) GetAddress() string

func (*MemberAttr) GetID

func (x *MemberAttr) GetID() uint64

func (*MemberAttr) GetName

func (x *MemberAttr) GetName() string

func (*MemberAttr) GetPeerID

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

func (*MemberAttr) MarshalJSON

func (mattr *MemberAttr) MarshalJSON() ([]byte, error)

func (*MemberAttr) ProtoMessage

func (*MemberAttr) ProtoMessage()

func (*MemberAttr) ProtoReflect added in v2.4.8

func (x *MemberAttr) ProtoReflect() protoreflect.Message

func (*MemberAttr) Reset

func (x *MemberAttr) Reset()

func (*MemberAttr) String

func (x *MemberAttr) String() string

func (*MemberAttr) ToString

func (mattr *MemberAttr) ToString() string

func (*MemberAttr) UnmarshalJSON

func (mattr *MemberAttr) UnmarshalJSON(data []byte) error

type MembershipChange

type MembershipChange struct {
	Type      MembershipChangeType `protobuf:"varint,1,opt,name=type,proto3,enum=types.MembershipChangeType" json:"type,omitempty"`
	RequestID uint64               `protobuf:"varint,2,opt,name=requestID,proto3" json:"requestID,omitempty"`
	Attr      *MemberAttr          `protobuf:"bytes,3,opt,name=attr,proto3" json:"attr,omitempty"`
	// contains filtered or unexported fields
}

func (*MembershipChange) Descriptor deprecated

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

Deprecated: Use MembershipChange.ProtoReflect.Descriptor instead.

func (*MembershipChange) GetAttr

func (x *MembershipChange) GetAttr() *MemberAttr

func (*MembershipChange) GetRequestID

func (x *MembershipChange) GetRequestID() uint64

func (*MembershipChange) GetType

func (*MembershipChange) ProtoMessage

func (*MembershipChange) ProtoMessage()

func (*MembershipChange) ProtoReflect added in v2.4.8

func (x *MembershipChange) ProtoReflect() protoreflect.Message

func (*MembershipChange) Reset

func (x *MembershipChange) Reset()

func (*MembershipChange) String

func (x *MembershipChange) String() string

func (*MembershipChange) ToString

func (mc *MembershipChange) ToString() string

type MembershipChangeReply

type MembershipChangeReply struct {
	Attr *MemberAttr `protobuf:"bytes,1,opt,name=attr,proto3" json:"attr,omitempty"`
	// contains filtered or unexported fields
}

func (*MembershipChangeReply) Descriptor deprecated

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

Deprecated: Use MembershipChangeReply.ProtoReflect.Descriptor instead.

func (*MembershipChangeReply) GetAttr

func (x *MembershipChangeReply) GetAttr() *MemberAttr

func (*MembershipChangeReply) ProtoMessage

func (*MembershipChangeReply) ProtoMessage()

func (*MembershipChangeReply) ProtoReflect added in v2.4.8

func (x *MembershipChangeReply) ProtoReflect() protoreflect.Message

func (*MembershipChangeReply) Reset

func (x *MembershipChangeReply) Reset()

func (*MembershipChangeReply) String

func (x *MembershipChangeReply) String() string

type MembershipChangeType

type MembershipChangeType int32

cluster member for raft consensus

const (
	MembershipChangeType_ADD_MEMBER    MembershipChangeType = 0
	MembershipChangeType_REMOVE_MEMBER MembershipChangeType = 1
)

func (MembershipChangeType) Descriptor added in v2.4.8

func (MembershipChangeType) Enum added in v2.4.8

func (MembershipChangeType) EnumDescriptor deprecated

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

Deprecated: Use MembershipChangeType.Descriptor instead.

func (MembershipChangeType) Number added in v2.4.8

func (MembershipChangeType) String

func (x MembershipChangeType) String() string

func (MembershipChangeType) Type added in v2.4.8

type MetricType

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) Descriptor added in v2.4.8

func (MetricType) Descriptor() protoreflect.EnumDescriptor

func (MetricType) Enum added in v2.4.8

func (x MetricType) Enum() *MetricType

func (MetricType) EnumDescriptor deprecated

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

Deprecated: Use MetricType.Descriptor instead.

func (MetricType) Number added in v2.4.8

func (x MetricType) Number() protoreflect.EnumNumber

func (MetricType) String

func (x MetricType) String() string

func (MetricType) Type added in v2.4.8

type Metrics

type Metrics struct {
	Peers []*PeerMetric `protobuf:"bytes,1,rep,name=peers,proto3" json:"peers,omitempty"`
	// contains filtered or unexported fields
}

func (*Metrics) Descriptor deprecated

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

Deprecated: Use Metrics.ProtoReflect.Descriptor instead.

func (*Metrics) GetPeers

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

func (*Metrics) ProtoMessage

func (*Metrics) ProtoMessage()

func (*Metrics) ProtoReflect added in v2.4.8

func (x *Metrics) ProtoReflect() protoreflect.Message

func (*Metrics) Reset

func (x *Metrics) Reset()

func (*Metrics) String

func (x *Metrics) String() string

type MetricsRequest

type MetricsRequest struct {
	Types []MetricType `protobuf:"varint,1,rep,packed,name=types,proto3,enum=types.MetricType" json:"types,omitempty"`
	// contains filtered or unexported fields
}

func (*MetricsRequest) Descriptor deprecated

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

Deprecated: Use MetricsRequest.ProtoReflect.Descriptor instead.

func (*MetricsRequest) GetTypes

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

func (*MetricsRequest) ProtoMessage

func (*MetricsRequest) ProtoMessage()

func (*MetricsRequest) ProtoReflect added in v2.4.8

func (x *MetricsRequest) ProtoReflect() protoreflect.Message

func (*MetricsRequest) Reset

func (x *MetricsRequest) Reset()

func (*MetricsRequest) String

func (x *MetricsRequest) String() string

type MovingAverage

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

func NewMovingAverage

func NewMovingAverage(size int) *MovingAverage

func (*MovingAverage) Add

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"`
	// contains filtered or unexported fields
}

MsgHeader contains common properties of all p2p messages

func (*MsgHeader) Descriptor deprecated

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

Deprecated: Use MsgHeader.ProtoReflect.Descriptor instead.

func (*MsgHeader) GetClientVersion

func (x *MsgHeader) GetClientVersion() string

func (*MsgHeader) GetGossip

func (x *MsgHeader) GetGossip() bool

func (*MsgHeader) GetId

func (x *MsgHeader) GetId() string

func (*MsgHeader) GetLength

func (x *MsgHeader) GetLength() uint32

func (*MsgHeader) GetNodePubKey

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

func (*MsgHeader) GetPeerID

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

func (*MsgHeader) GetSign

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

func (*MsgHeader) GetSubprotocol

func (x *MsgHeader) GetSubprotocol() uint32

func (*MsgHeader) GetTimestamp

func (x *MsgHeader) GetTimestamp() int64

func (*MsgHeader) ProtoMessage

func (*MsgHeader) ProtoMessage()

func (*MsgHeader) ProtoReflect added in v2.4.8

func (x *MsgHeader) ProtoReflect() protoreflect.Message

func (*MsgHeader) Reset

func (x *MsgHeader) Reset()

func (*MsgHeader) String

func (x *MsgHeader) String() string

type Multiaddr

type Multiaddr = multiaddr.Multiaddr

Multiaddr is alias of

func ParseMultiaddr

func ParseMultiaddr(str string) (Multiaddr, error)

ParseMultiaddr parse multiaddr formatted string to Multiaddr with slightly different manner; it automatically auusme that /dns is /dns4

func PeerToMultiAddr

func PeerToMultiAddr(address string, port uint32, pid PeerID) (Multiaddr, error)

func ToMultiAddr

func ToMultiAddr(address string, port uint32) (Multiaddr, error)

ToMultiAddr make libp2p compatible Multiaddr object

type Name

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"`
	// contains filtered or unexported fields
}

func (*Name) Descriptor deprecated

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

Deprecated: Use Name.ProtoReflect.Descriptor instead.

func (*Name) GetBlockNo

func (x *Name) GetBlockNo() uint64

func (*Name) GetName

func (x *Name) GetName() string

func (*Name) ProtoMessage

func (*Name) ProtoMessage()

func (*Name) ProtoReflect added in v2.4.8

func (x *Name) ProtoReflect() protoreflect.Message

func (*Name) Reset

func (x *Name) Reset()

func (*Name) String

func (x *Name) String() string

type NameInfo

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"`
	// contains filtered or unexported fields
}

func (*NameInfo) Descriptor deprecated

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

Deprecated: Use NameInfo.ProtoReflect.Descriptor instead.

func (*NameInfo) GetDestination

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

func (*NameInfo) GetName

func (x *NameInfo) GetName() *Name

func (*NameInfo) GetOwner

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

func (*NameInfo) ProtoMessage

func (*NameInfo) ProtoMessage()

func (*NameInfo) ProtoReflect added in v2.4.8

func (x *NameInfo) ProtoReflect() protoreflect.Message

func (*NameInfo) Reset

func (x *NameInfo) Reset()

func (*NameInfo) String

func (x *NameInfo) String() string

type NetAddress

type NetAddress struct {
	Type    AddrType
	Address string
	Port    uint32
}

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"`
	// contains filtered or unexported fields
}

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 deprecated

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

Deprecated: Use NewBlockNotice.ProtoReflect.Descriptor instead.

func (*NewBlockNotice) GetBlockHash

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

func (*NewBlockNotice) GetBlockNo

func (x *NewBlockNotice) GetBlockNo() uint64

func (*NewBlockNotice) ProtoMessage

func (*NewBlockNotice) ProtoMessage()

func (*NewBlockNotice) ProtoReflect added in v2.4.8

func (x *NewBlockNotice) ProtoReflect() protoreflect.Message

func (*NewBlockNotice) Reset

func (x *NewBlockNotice) Reset()

func (*NewBlockNotice) String

func (x *NewBlockNotice) String() string

type NewTransactionsNotice

type NewTransactionsNotice struct {
	TxHashes [][]byte `protobuf:"bytes,1,rep,name=txHashes,proto3" json:"txHashes,omitempty"`
	// contains filtered or unexported fields
}

func (*NewTransactionsNotice) Descriptor deprecated

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

Deprecated: Use NewTransactionsNotice.ProtoReflect.Descriptor instead.

func (*NewTransactionsNotice) GetTxHashes

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

func (*NewTransactionsNotice) MarshalZerologObject

func (m *NewTransactionsNotice) MarshalZerologObject(e *zerolog.Event)

func (*NewTransactionsNotice) ProtoMessage

func (*NewTransactionsNotice) ProtoMessage()

func (*NewTransactionsNotice) ProtoReflect added in v2.4.8

func (x *NewTransactionsNotice) ProtoReflect() protoreflect.Message

func (*NewTransactionsNotice) Reset

func (x *NewTransactionsNotice) Reset()

func (*NewTransactionsNotice) String

func (x *NewTransactionsNotice) String() string

type NodeReq

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"`
	// contains filtered or unexported fields
}

func (*NodeReq) Descriptor deprecated

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

Deprecated: Use NodeReq.ProtoReflect.Descriptor instead.

func (*NodeReq) GetComponent

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

func (*NodeReq) GetTimeout

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

func (*NodeReq) ProtoMessage

func (*NodeReq) ProtoMessage()

func (*NodeReq) ProtoReflect added in v2.4.8

func (x *NodeReq) ProtoReflect() protoreflect.Message

func (*NodeReq) Reset

func (x *NodeReq) Reset()

func (*NodeReq) String

func (x *NodeReq) String() string

type OpSysTx

type OpSysTx int

OpSysTx represents a kind of a system transaction.

const (

	// OpvoteBP corresponds to a voting transaction for a BP election.
	OpvoteBP OpSysTx = iota
	// OpvoteDAO corresponds to a proposal transaction for a system parameter change.
	OpvoteDAO
	// Opstake represents a staking tranaction.
	Opstake
	// Opunstake represents a unstaking tranaction.
	Opunstake
	// OpSysTxMax is the maximum of system tx OP numbers.
	OpSysTxMax
)

func GetOpSysTx

func GetOpSysTx(vName string) OpSysTx

GetOpSysTx returns a OpSysTx value corresponding to vName.

func (OpSysTx) Cmd

func (op OpSysTx) Cmd() string

Cmd returns a string representation for op.

func (OpSysTx) ID

func (op OpSysTx) ID() string

Name returns a unprefixed name corresponding to op.

func (OpSysTx) Key

func (op OpSysTx) Key() []byte

func (OpSysTx) String

func (i OpSysTx) String() string

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"`
	// contains filtered or unexported fields
}

func (*Output) Descriptor deprecated

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

Deprecated: Use Output.ProtoReflect.Descriptor instead.

func (*Output) GetAddress

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

func (*Output) GetIndex

func (x *Output) GetIndex() uint32

func (*Output) GetScript

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

func (*Output) GetValue

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

func (*Output) ProtoMessage

func (*Output) ProtoMessage()

func (*Output) ProtoReflect added in v2.4.8

func (x *Output) ProtoReflect() protoreflect.Message

func (*Output) Reset

func (x *Output) Reset()

func (*Output) String

func (x *Output) String() string

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"`
	// contains filtered or unexported fields
}

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

func (*P2PMessage) Descriptor deprecated

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

Deprecated: Use P2PMessage.ProtoReflect.Descriptor instead.

func (*P2PMessage) GetData

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

func (*P2PMessage) GetHeader

func (x *P2PMessage) GetHeader() *MsgHeader

func (*P2PMessage) ProtoMessage

func (*P2PMessage) ProtoMessage()

func (*P2PMessage) ProtoReflect added in v2.4.8

func (x *P2PMessage) ProtoReflect() protoreflect.Message

func (*P2PMessage) Reset

func (x *P2PMessage) Reset()

func (*P2PMessage) String

func (x *P2PMessage) String() string

type PageParams

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"`
	// contains filtered or unexported fields
}

func (*PageParams) Descriptor deprecated

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

Deprecated: Use PageParams.ProtoReflect.Descriptor instead.

func (*PageParams) GetOffset

func (x *PageParams) GetOffset() uint32

func (*PageParams) GetSize

func (x *PageParams) GetSize() uint32

func (*PageParams) ProtoMessage

func (*PageParams) ProtoMessage()

func (*PageParams) ProtoReflect added in v2.4.8

func (x *PageParams) ProtoReflect() protoreflect.Message

func (*PageParams) Reset

func (x *PageParams) Reset()

func (*PageParams) String

func (x *PageParams) String() string

type Paginations

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"`
	// contains filtered or unexported fields
}

func (*Paginations) Descriptor deprecated

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

Deprecated: Use Paginations.ProtoReflect.Descriptor instead.

func (*Paginations) GetRef

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

func (*Paginations) GetSize

func (x *Paginations) GetSize() uint32

func (*Paginations) ProtoMessage

func (*Paginations) ProtoMessage()

func (*Paginations) ProtoReflect added in v2.4.8

func (x *Paginations) ProtoReflect() protoreflect.Message

func (*Paginations) Reset

func (x *Paginations) Reset()

func (*Paginations) String

func (x *Paginations) String() string

type Peer

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"`
	Certificates []*AgentCertificate `protobuf:"bytes,8,rep,name=certificates,proto3" json:"certificates,omitempty"`
	AcceptedRole PeerRole            `protobuf:"varint,9,opt,name=acceptedRole,proto3,enum=types.PeerRole" json:"acceptedRole,omitempty"`
	// contains filtered or unexported fields
}

func (*Peer) Descriptor deprecated

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

Deprecated: Use Peer.ProtoReflect.Descriptor instead.

func (*Peer) GetAcceptedRole

func (x *Peer) GetAcceptedRole() PeerRole

func (*Peer) GetAddress

func (x *Peer) GetAddress() *PeerAddress

func (*Peer) GetBestblock

func (x *Peer) GetBestblock() *NewBlockNotice

func (*Peer) GetCertificates

func (x *Peer) GetCertificates() []*AgentCertificate

func (*Peer) GetHidden

func (x *Peer) GetHidden() bool

func (*Peer) GetLashCheck

func (x *Peer) GetLashCheck() int64

func (*Peer) GetSelfpeer

func (x *Peer) GetSelfpeer() bool

func (*Peer) GetState

func (x *Peer) GetState() int32

func (*Peer) GetVersion

func (x *Peer) GetVersion() string

func (*Peer) ProtoMessage

func (*Peer) ProtoMessage()

func (*Peer) ProtoReflect added in v2.4.8

func (x *Peer) ProtoReflect() protoreflect.Message

func (*Peer) Reset

func (x *Peer) Reset()

func (*Peer) String

func (x *Peer) String() string

type PeerAddress

type PeerAddress struct {

	// @Deprecated advertised address and port will be in addresses field in aergo v2.
	// address is string representation of ip address or domain name.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// @Deprecated
	Port        uint32   `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
	PeerID      []byte   `protobuf:"bytes,3,opt,name=peerID,proto3" json:"peerID,omitempty"`
	Role        PeerRole `protobuf:"varint,4,opt,name=role,proto3,enum=types.PeerRole" json:"role,omitempty"`
	Version     string   `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"`
	Addresses   []string `protobuf:"bytes,6,rep,name=addresses,proto3" json:"addresses,omitempty"`
	ProducerIDs [][]byte `protobuf:"bytes,7,rep,name=producerIDs,proto3" json:"producerIDs,omitempty"`
	// contains filtered or unexported fields
}

PeerAddress contains static information of peer and addresses to connect peer

func (*PeerAddress) Descriptor deprecated

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

Deprecated: Use PeerAddress.ProtoReflect.Descriptor instead.

func (*PeerAddress) GetAddress

func (x *PeerAddress) GetAddress() string

func (*PeerAddress) GetAddresses

func (x *PeerAddress) GetAddresses() []string

func (*PeerAddress) GetPeerID

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

func (*PeerAddress) GetPort

func (x *PeerAddress) GetPort() uint32

func (*PeerAddress) GetProducerIDs

func (x *PeerAddress) GetProducerIDs() [][]byte

func (*PeerAddress) GetRole

func (x *PeerAddress) GetRole() PeerRole

func (*PeerAddress) GetVersion

func (x *PeerAddress) GetVersion() string

func (*PeerAddress) ProtoMessage

func (*PeerAddress) ProtoMessage()

func (*PeerAddress) ProtoReflect added in v2.4.8

func (x *PeerAddress) ProtoReflect() protoreflect.Message

func (*PeerAddress) Reset

func (x *PeerAddress) Reset()

func (*PeerAddress) String

func (x *PeerAddress) String() string

type PeerBlockInfo

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

type PeerID

type PeerID = core.PeerID

PeerID is identifier of peer. It is alias of libp2p.PeerID for now

func IDB58Decode

func IDB58Decode(b58 string) (PeerID, error)

func IDFromBytes

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

func IDFromPrivateKey

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

func IDFromPublicKey

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

func RandomPeerID

func RandomPeerID() PeerID

NOTE use only in test

type PeerList

type PeerList struct {
	Peers []*Peer `protobuf:"bytes,1,rep,name=peers,proto3" json:"peers,omitempty"`
	// contains filtered or unexported fields
}

func (*PeerList) Descriptor deprecated

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

Deprecated: Use PeerList.ProtoReflect.Descriptor instead.

func (*PeerList) GetPeers

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

func (*PeerList) ProtoMessage

func (*PeerList) ProtoMessage()

func (*PeerList) ProtoReflect added in v2.4.8

func (x *PeerList) ProtoReflect() protoreflect.Message

func (*PeerList) Reset

func (x *PeerList) Reset()

func (*PeerList) String

func (x *PeerList) String() string

type PeerMetric

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"`
	// contains filtered or unexported fields
}

func (*PeerMetric) Descriptor deprecated

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

Deprecated: Use PeerMetric.ProtoReflect.Descriptor instead.

func (*PeerMetric) GetAvrIn

func (x *PeerMetric) GetAvrIn() int64

func (*PeerMetric) GetAvrOut

func (x *PeerMetric) GetAvrOut() int64

func (*PeerMetric) GetPeerID

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

func (*PeerMetric) GetSumIn

func (x *PeerMetric) GetSumIn() int64

func (*PeerMetric) GetSumOut

func (x *PeerMetric) GetSumOut() int64

func (*PeerMetric) ProtoMessage

func (*PeerMetric) ProtoMessage()

func (*PeerMetric) ProtoReflect added in v2.4.8

func (x *PeerMetric) ProtoReflect() protoreflect.Message

func (*PeerMetric) Reset

func (x *PeerMetric) Reset()

func (*PeerMetric) String

func (x *PeerMetric) String() string

type PeerRole

type PeerRole int32
const (
	PeerRole_LegacyVersion PeerRole = 0
	PeerRole_Producer      PeerRole = 1
	PeerRole_Watcher       PeerRole = 2
	PeerRole_Agent         PeerRole = 3
)

func (PeerRole) Descriptor added in v2.4.8

func (PeerRole) Descriptor() protoreflect.EnumDescriptor

func (PeerRole) Enum added in v2.4.8

func (x PeerRole) Enum() *PeerRole

func (PeerRole) EnumDescriptor deprecated

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

Deprecated: Use PeerRole.Descriptor instead.

func (PeerRole) MarshalJSON

func (x PeerRole) MarshalJSON() ([]byte, error)

func (PeerRole) Number added in v2.4.8

func (x PeerRole) Number() protoreflect.EnumNumber

func (PeerRole) String

func (x PeerRole) String() string

func (PeerRole) Type added in v2.4.8

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

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"`
	// contains filtered or unexported fields
}

func (*PeersParams) Descriptor deprecated

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

Deprecated: Use PeersParams.ProtoReflect.Descriptor instead.

func (*PeersParams) GetNoHidden

func (x *PeersParams) GetNoHidden() bool

func (*PeersParams) GetShowSelf

func (x *PeersParams) GetShowSelf() bool

func (*PeersParams) ProtoMessage

func (*PeersParams) ProtoMessage()

func (*PeersParams) ProtoReflect added in v2.4.8

func (x *PeersParams) ProtoReflect() protoreflect.Message

func (*PeersParams) Reset

func (x *PeersParams) Reset()

func (*PeersParams) String

func (x *PeersParams) String() string

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"`
	// contains filtered or unexported fields
}

func (*Personal) Descriptor deprecated

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

Deprecated: Use Personal.ProtoReflect.Descriptor instead.

func (*Personal) GetAccount

func (x *Personal) GetAccount() *Account

func (*Personal) GetPassphrase

func (x *Personal) GetPassphrase() string

func (*Personal) ProtoMessage

func (*Personal) ProtoMessage()

func (*Personal) ProtoReflect added in v2.4.8

func (x *Personal) ProtoReflect() protoreflect.Message

func (*Personal) Reset

func (x *Personal) Reset()

func (*Personal) String

func (x *Personal) String() string

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"`
	// contains filtered or unexported fields
}

Ping request message

func (*Ping) Descriptor deprecated

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

Deprecated: Use Ping.ProtoReflect.Descriptor instead.

func (*Ping) GetBestBlockHash

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

func (*Ping) GetBestHeight

func (x *Ping) GetBestHeight() uint64

func (*Ping) MarshalZerologObject

func (m *Ping) MarshalZerologObject(e *zerolog.Event)

func (*Ping) ProtoMessage

func (*Ping) ProtoMessage()

func (*Ping) ProtoReflect added in v2.4.8

func (x *Ping) ProtoReflect() protoreflect.Message

func (*Ping) Reset

func (x *Ping) Reset()

func (*Ping) String

func (x *Ping) String() string

type PolarisPeer

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 unix timestamp 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"`
	// contains filtered or unexported fields
}

func (*PolarisPeer) Descriptor deprecated

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

Deprecated: Use PolarisPeer.ProtoReflect.Descriptor instead.

func (*PolarisPeer) GetAddress

func (x *PolarisPeer) GetAddress() *PeerAddress

func (*PolarisPeer) GetConnected

func (x *PolarisPeer) GetConnected() int64

func (*PolarisPeer) GetLastCheck

func (x *PolarisPeer) GetLastCheck() int64

func (*PolarisPeer) GetVerion

func (x *PolarisPeer) GetVerion() string

func (*PolarisPeer) ProtoMessage

func (*PolarisPeer) ProtoMessage()

func (*PolarisPeer) ProtoReflect added in v2.4.8

func (x *PolarisPeer) ProtoReflect() protoreflect.Message

func (*PolarisPeer) Reset

func (x *PolarisPeer) Reset()

func (*PolarisPeer) String

func (x *PolarisPeer) String() string

type PolarisPeerList

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"`
	// contains filtered or unexported fields
}

func (*PolarisPeerList) Descriptor deprecated

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

Deprecated: Use PolarisPeerList.ProtoReflect.Descriptor instead.

func (*PolarisPeerList) GetHasNext

func (x *PolarisPeerList) GetHasNext() bool

func (*PolarisPeerList) GetPeers

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

func (*PolarisPeerList) GetTotal

func (x *PolarisPeerList) GetTotal() uint32

func (*PolarisPeerList) ProtoMessage

func (*PolarisPeerList) ProtoMessage()

func (*PolarisPeerList) ProtoReflect added in v2.4.8

func (x *PolarisPeerList) ProtoReflect() protoreflect.Message

func (*PolarisPeerList) Reset

func (x *PolarisPeerList) Reset()

func (*PolarisPeerList) String

func (x *PolarisPeerList) String() string

type PolarisRPCServiceClient

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)
	ListBLEntries(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*BLConfEntries, error)
	AddBLEntry(ctx context.Context, in *AddEntryParams, opts ...grpc.CallOption) (*SingleString, error)
	RemoveBLEntry(ctx context.Context, in *RmEntryParams, opts ...grpc.CallOption) (*SingleString, error)
}

PolarisRPCServiceClient is the client API for PolarisRPCService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type PolarisRPCServiceServer

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)
	ListBLEntries(context.Context, *Empty) (*BLConfEntries, error)
	AddBLEntry(context.Context, *AddEntryParams) (*SingleString, error)
	RemoveBLEntry(context.Context, *RmEntryParams) (*SingleString, error)
	// contains filtered or unexported methods
}

PolarisRPCServiceServer is the server API for PolarisRPCService service. All implementations must embed UnimplementedPolarisRPCServiceServer for forward compatibility

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"`
	// contains filtered or unexported fields
}

Ping response message

func (*Pong) Descriptor deprecated

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

Deprecated: Use Pong.ProtoReflect.Descriptor instead.

func (*Pong) GetBestBlockHash

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

func (*Pong) GetBestHeight

func (x *Pong) GetBestHeight() uint64

func (*Pong) ProtoMessage

func (*Pong) ProtoMessage()

func (*Pong) ProtoReflect added in v2.4.8

func (x *Pong) ProtoReflect() protoreflect.Message

func (*Pong) Reset

func (x *Pong) Reset()

func (*Pong) String

func (x *Pong) String() string

type ProducerID

type ProducerID = core.PeerID

ProducerID is identifier of block producer. It is same format with the PeerID at version 1.x, but might be changed to other format later.

type Proposal

type Proposal struct {
	Id             string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Description    string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	MultipleChoice uint32 `protobuf:"varint,6,opt,name=multipleChoice,proto3" json:"multipleChoice,omitempty"`
	// contains filtered or unexported fields
}

func (*Proposal) Descriptor deprecated

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

Deprecated: Use Proposal.ProtoReflect.Descriptor instead.

func (*Proposal) GetDescription

func (x *Proposal) GetDescription() string

func (*Proposal) GetId

func (x *Proposal) GetId() string

func (*Proposal) GetMultipleChoice

func (x *Proposal) GetMultipleChoice() uint32

func (*Proposal) ProtoMessage

func (*Proposal) ProtoMessage()

func (*Proposal) ProtoReflect added in v2.4.8

func (x *Proposal) ProtoReflect() protoreflect.Message

func (*Proposal) Reset

func (x *Proposal) Reset()

func (*Proposal) String

func (x *Proposal) String() string

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"`
	// contains filtered or unexported fields
}

func (*Query) Descriptor deprecated

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

Deprecated: Use Query.ProtoReflect.Descriptor instead.

func (*Query) GetContractAddress

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

func (*Query) GetQueryinfo

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

func (*Query) ProtoMessage

func (*Query) ProtoMessage()

func (*Query) ProtoReflect added in v2.4.8

func (x *Query) ProtoReflect() protoreflect.Message

func (*Query) Reset

func (x *Query) Reset()

func (*Query) String

func (x *Query) String() string

type RaftMbrsMarshaller

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

func (RaftMbrsMarshaller) MarshalZerologArray

func (m RaftMbrsMarshaller) MarshalZerologArray(a *zerolog.Array)

type RawEntry

type RawEntry struct {
	Address string `json:"address"`
	Cidr    string `json:"cidr"`
	PeerId  string `json:"peerid"`
}

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"`
	FeeDelegation     bool     `protobuf:"varint,14,opt,name=feeDelegation,proto3" json:"feeDelegation,omitempty"`
	GasUsed           uint64   `protobuf:"varint,15,opt,name=gasUsed,proto3" json:"gasUsed,omitempty"`
	// contains filtered or unexported fields
}

func NewReceipt

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

func (*Receipt) BloomFilter

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

func (*Receipt) Descriptor deprecated

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

Deprecated: Use Receipt.ProtoReflect.Descriptor instead.

func (*Receipt) GetBlockHash

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

func (*Receipt) GetBlockNo

func (x *Receipt) GetBlockNo() uint64

func (*Receipt) GetBloom

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

func (*Receipt) GetContractAddress

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

func (*Receipt) GetCumulativeFeeUsed

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

func (*Receipt) GetEvents

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

func (*Receipt) GetFeeDelegation

func (x *Receipt) GetFeeDelegation() bool

func (*Receipt) GetFeeUsed

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

func (*Receipt) GetFrom

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

func (*Receipt) GetGasUsed

func (x *Receipt) GetGasUsed() uint64

func (*Receipt) GetHash

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

func (*Receipt) GetRet

func (x *Receipt) GetRet() string

func (*Receipt) GetStatus

func (x *Receipt) GetStatus() string

func (*Receipt) GetTo

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

func (*Receipt) GetTxHash

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

func (*Receipt) GetTxIndex

func (x *Receipt) GetTxIndex() int32

func (*Receipt) MarshalBinaryTest

func (r *Receipt) MarshalBinaryTest() ([]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

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

func (*Receipt) MarshalMerkleBinaryV2

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

func (*Receipt) ProtoMessage

func (*Receipt) ProtoMessage()

func (*Receipt) ProtoReflect added in v2.4.8

func (x *Receipt) ProtoReflect() protoreflect.Message

func (*Receipt) ReadFrom

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

func (*Receipt) Reset

func (x *Receipt) Reset()

func (*Receipt) SetMemoryInfo

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

func (*Receipt) String

func (x *Receipt) String() string

func (*Receipt) UnmarshalBinaryTest

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

type ReceiptMerkle

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

func (*ReceiptMerkle) GetHash

func (rm *ReceiptMerkle) GetHash() []byte

type Receipts

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

func (*Receipts) BloomFilter

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

func (*Receipts) Get

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

func (*Receipts) MarshalBinary

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

func (*Receipts) MergeBloom

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

func (*Receipts) MerkleRoot

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

func (*Receipts) Set

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

func (*Receipts) SetHardFork

func (rs *Receipts) SetHardFork(hardForkConfig BlockVersionner, blockNo BlockNo)

func (*Receipts) UnmarshalBinary

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

type ResponseMessage

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) Descriptor added in v2.4.8

func (ResultStatus) Enum added in v2.4.8

func (x ResultStatus) Enum() *ResultStatus

func (ResultStatus) EnumDescriptor deprecated

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

Deprecated: Use ResultStatus.Descriptor instead.

func (ResultStatus) Number added in v2.4.8

func (ResultStatus) String

func (x ResultStatus) String() string

func (ResultStatus) Type added in v2.4.8

type RmEntryParams

type RmEntryParams struct {
	Index uint32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
	// contains filtered or unexported fields
}

func (*RmEntryParams) Descriptor deprecated

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

Deprecated: Use RmEntryParams.ProtoReflect.Descriptor instead.

func (*RmEntryParams) GetIndex

func (x *RmEntryParams) GetIndex() uint32

func (*RmEntryParams) ProtoMessage

func (*RmEntryParams) ProtoMessage()

func (*RmEntryParams) ProtoReflect added in v2.4.8

func (x *RmEntryParams) ProtoReflect() protoreflect.Message

func (*RmEntryParams) Reset

func (x *RmEntryParams) Reset()

func (*RmEntryParams) String

func (x *RmEntryParams) String() string

type ServerInfo

type ServerInfo struct {
	Status map[string]string      `` /* 153-byte string literal not displayed */
	Config map[string]*ConfigItem `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ServerInfo) Descriptor deprecated

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

Deprecated: Use ServerInfo.ProtoReflect.Descriptor instead.

func (*ServerInfo) GetConfig

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

func (*ServerInfo) GetStatus

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

func (*ServerInfo) ProtoMessage

func (*ServerInfo) ProtoMessage()

func (*ServerInfo) ProtoReflect added in v2.4.8

func (x *ServerInfo) ProtoReflect() protoreflect.Message

func (*ServerInfo) Reset

func (x *ServerInfo) Reset()

func (*ServerInfo) String

func (x *ServerInfo) String() string

type SingleBytes

type SingleBytes struct {
	Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*SingleBytes) Descriptor deprecated

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

Deprecated: Use SingleBytes.ProtoReflect.Descriptor instead.

func (*SingleBytes) GetValue

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

func (*SingleBytes) ProtoMessage

func (*SingleBytes) ProtoMessage()

func (*SingleBytes) ProtoReflect added in v2.4.8

func (x *SingleBytes) ProtoReflect() protoreflect.Message

func (*SingleBytes) Reset

func (x *SingleBytes) Reset()

func (*SingleBytes) String

func (x *SingleBytes) String() string

type SingleString

type SingleString struct {
	Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*SingleString) Descriptor deprecated

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

Deprecated: Use SingleString.ProtoReflect.Descriptor instead.

func (*SingleString) GetValue

func (x *SingleString) GetValue() string

func (*SingleString) ProtoMessage

func (*SingleString) ProtoMessage()

func (*SingleString) ProtoReflect added in v2.4.8

func (x *SingleString) ProtoReflect() protoreflect.Message

func (*SingleString) Reset

func (x *SingleString) Reset()

func (*SingleString) String

func (x *SingleString) String() string

type SnapshotResponse

type SnapshotResponse struct {
	Status  ResultStatus `protobuf:"varint,1,opt,name=status,proto3,enum=types.ResultStatus" json:"status,omitempty"`
	Message string       `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

SnapshotResponse is response message of receiving peer

func (*SnapshotResponse) Descriptor deprecated

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

Deprecated: Use SnapshotResponse.ProtoReflect.Descriptor instead.

func (*SnapshotResponse) GetMessage

func (x *SnapshotResponse) GetMessage() string

func (*SnapshotResponse) GetStatus

func (x *SnapshotResponse) GetStatus() ResultStatus

func (*SnapshotResponse) ProtoMessage

func (*SnapshotResponse) ProtoMessage()

func (*SnapshotResponse) ProtoReflect added in v2.4.8

func (x *SnapshotResponse) ProtoReflect() protoreflect.Message

func (*SnapshotResponse) Reset

func (x *SnapshotResponse) Reset()

func (*SnapshotResponse) String

func (x *SnapshotResponse) String() string

type Staking

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"`
	// contains filtered or unexported fields
}

func (*Staking) Add

func (s *Staking) Add(amount *big.Int)

Add adds amount to s.Amount.

func (*Staking) Descriptor deprecated

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

Deprecated: Use Staking.ProtoReflect.Descriptor instead.

func (*Staking) GetAmount

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

func (*Staking) GetAmountBigInt

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

func (*Staking) GetWhen

func (x *Staking) GetWhen() uint64

func (*Staking) ProtoMessage

func (*Staking) ProtoMessage()

func (*Staking) ProtoReflect added in v2.4.8

func (x *Staking) ProtoReflect() protoreflect.Message

func (*Staking) Reset

func (x *Staking) Reset()

func (*Staking) SetWhen

func (s *Staking) SetWhen(blockNo BlockNo)

func (*Staking) String

func (x *Staking) String() string

func (*Staking) Sub

func (s *Staking) Sub(amount *big.Int) *big.Int

Sub substracts amount from s.Amount and returns the actual adjustment.

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"`
	// contains filtered or unexported fields
}

func NewState

func NewState() *State

NewState returns an instance of account state

func (*State) Descriptor deprecated

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

Deprecated: Use State.ProtoReflect.Descriptor instead.

func (*State) GetBalance

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

func (*State) GetBalanceBigInt

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

func (*State) GetCodeHash

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

func (*State) GetNonce

func (x *State) GetNonce() uint64

func (*State) GetSqlRecoveryPoint

func (x *State) GetSqlRecoveryPoint() uint64

func (*State) GetStorageRoot

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

func (*State) ProtoMessage

func (*State) ProtoMessage()

func (*State) ProtoReflect added in v2.4.8

func (x *State) ProtoReflect() protoreflect.Message

func (*State) Reset

func (x *State) Reset()

func (*State) String

func (x *State) String() string

type StateQuery

type StateQuery struct {
	ContractAddress []byte   `protobuf:"bytes,1,opt,name=contractAddress,proto3" json:"contractAddress,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"`
	StorageKeys     [][]byte `protobuf:"bytes,5,rep,name=storageKeys,proto3" json:"storageKeys,omitempty"`
	// contains filtered or unexported fields
}

func (*StateQuery) Descriptor deprecated

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

Deprecated: Use StateQuery.ProtoReflect.Descriptor instead.

func (*StateQuery) GetCompressed

func (x *StateQuery) GetCompressed() bool

func (*StateQuery) GetContractAddress

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

func (*StateQuery) GetRoot

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

func (*StateQuery) GetStorageKeys

func (x *StateQuery) GetStorageKeys() [][]byte

func (*StateQuery) ProtoMessage

func (*StateQuery) ProtoMessage()

func (*StateQuery) ProtoReflect added in v2.4.8

func (x *StateQuery) ProtoReflect() protoreflect.Message

func (*StateQuery) Reset

func (x *StateQuery) Reset()

func (*StateQuery) String

func (x *StateQuery) String() string

type StateQueryProof

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"`
	// contains filtered or unexported fields
}

func (*StateQueryProof) Descriptor deprecated

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

Deprecated: Use StateQueryProof.ProtoReflect.Descriptor instead.

func (*StateQueryProof) GetContractProof

func (x *StateQueryProof) GetContractProof() *AccountProof

func (*StateQueryProof) GetVarProofs

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

func (*StateQueryProof) ProtoMessage

func (*StateQueryProof) ProtoMessage()

func (*StateQueryProof) ProtoReflect added in v2.4.8

func (x *StateQueryProof) ProtoReflect() protoreflect.Message

func (*StateQueryProof) Reset

func (x *StateQueryProof) Reset()

func (*StateQueryProof) String

func (x *StateQueryProof) String() string

type StateVar

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"`
	// contains filtered or unexported fields
}

func (*StateVar) Descriptor deprecated

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

Deprecated: Use StateVar.ProtoReflect.Descriptor instead.

func (*StateVar) GetLen

func (x *StateVar) GetLen() int32

func (*StateVar) GetName

func (x *StateVar) GetName() string

func (*StateVar) GetType

func (x *StateVar) GetType() string

func (*StateVar) ProtoMessage

func (*StateVar) ProtoMessage()

func (*StateVar) ProtoReflect added in v2.4.8

func (x *StateVar) ProtoReflect() protoreflect.Message

func (*StateVar) Reset

func (x *StateVar) Reset()

func (*StateVar) String

func (x *StateVar) String() string

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"`
	// @Deprecated version is used in PeerAddress since aergo v2.
	// version of server binary.
	Version string `protobuf:"bytes,6,opt,name=version,proto3" json:"version,omitempty"`
	// hash of genesis block
	Genesis      []byte              `protobuf:"bytes,7,opt,name=genesis,proto3" json:"genesis,omitempty"`
	Certificates []*AgentCertificate `protobuf:"bytes,8,rep,name=certificates,proto3" json:"certificates,omitempty"`
	// request to issue agent certificates
	IssueCertificate bool `protobuf:"varint,9,opt,name=issueCertificate,proto3" json:"issueCertificate,omitempty"`
	// contains filtered or unexported fields
}

Status is peer status exchanged during handshake.

func (*Status) Descriptor deprecated

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

Deprecated: Use Status.ProtoReflect.Descriptor instead.

func (*Status) GetBestBlockHash

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

func (*Status) GetBestHeight

func (x *Status) GetBestHeight() uint64

func (*Status) GetCertificates

func (x *Status) GetCertificates() []*AgentCertificate

func (*Status) GetChainID

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

func (*Status) GetGenesis

func (x *Status) GetGenesis() []byte

func (*Status) GetIssueCertificate

func (x *Status) GetIssueCertificate() bool

func (*Status) GetNoExpose

func (x *Status) GetNoExpose() bool

func (*Status) GetSender

func (x *Status) GetSender() *PeerAddress

func (*Status) GetVersion

func (x *Status) GetVersion() string

func (*Status) ProtoMessage

func (*Status) ProtoMessage()

func (*Status) ProtoReflect added in v2.4.8

func (x *Status) ProtoReflect() protoreflect.Message

func (*Status) Reset

func (x *Status) Reset()

func (*Status) String

func (x *Status) String() string

type Stream

type Stream = core.Stream

Stream is alias of libp2p.Stream

type SyncContext

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

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

func (*SyncContext) SetAncestor

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

type SystemValue

type SystemValue int
const (
	StakingTotal SystemValue = 0 + iota
	StakingMin
	GasPrice
	NamePrice
	TotalVotingPower
	VotingReward
)

func (SystemValue) String

func (i SystemValue) String() string

type TokenUnit

type TokenUnit uint64
const (
	Aergo TokenUnit = 1e18
	Gaer  TokenUnit = 1e9
	Aer   TokenUnit = 1
)

type Transaction

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

func NewTransaction

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"`
	// contains filtered or unexported fields
}

func NewTx

func NewTx() *Tx

func (*Tx) CalculateTxHash

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

func (*Tx) Clone

func (tx *Tx) Clone() *Tx

func (*Tx) Descriptor deprecated

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

Deprecated: Use Tx.ProtoReflect.Descriptor instead.

func (*Tx) GetBody

func (x *Tx) GetBody() *TxBody

func (*Tx) GetHash

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

func (*Tx) HasNameAccount

func (tx *Tx) HasNameAccount() bool

func (*Tx) HasNameRecipient

func (tx *Tx) HasNameRecipient() bool

func (*Tx) NeedNameVerify

func (tx *Tx) NeedNameVerify() bool

func (*Tx) ProtoMessage

func (*Tx) ProtoMessage()

func (*Tx) ProtoReflect added in v2.4.8

func (x *Tx) ProtoReflect() protoreflect.Message

func (*Tx) Reset

func (x *Tx) Reset()

func (*Tx) String

func (x *Tx) String() string

func (*Tx) ValidateWithContractState

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

TODO : refoctor after ContractState move to types

type TxBody

type TxBody struct {
	Nonce       uint64 `protobuf:"varint,1,opt,name=nonce,proto3" json:"nonce,omitempty"`        // increasing number used only once per sender account
	Account     []byte `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"`     // decoded account address
	Recipient   []byte `protobuf:"bytes,3,opt,name=recipient,proto3" json:"recipient,omitempty"` // decoded account address
	Amount      []byte `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"`       // variable-length big integer
	Payload     []byte `protobuf:"bytes,5,opt,name=payload,proto3" json:"payload,omitempty"`
	GasLimit    uint64 `protobuf:"varint,6,opt,name=gasLimit,proto3" json:"gasLimit,omitempty"` // maximum gas used for this transaction. 0 = no limit
	GasPrice    []byte `protobuf:"bytes,7,opt,name=gasPrice,proto3" json:"gasPrice,omitempty"`  // variable-length big integer. currently not used
	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"` // hash value of chain identifier in the block
	Sign        []byte `protobuf:"bytes,10,opt,name=sign,proto3" json:"sign,omitempty"`              // sender's signature for this TxBody
	// contains filtered or unexported fields
}

func (*TxBody) Descriptor deprecated

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

Deprecated: Use TxBody.ProtoReflect.Descriptor instead.

func (*TxBody) GetAccount

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

func (*TxBody) GetAmount

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

func (*TxBody) GetAmountBigInt

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

func (*TxBody) GetChainIdHash

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

func (*TxBody) GetGasLimit

func (x *TxBody) GetGasLimit() uint64

func (*TxBody) GetGasPrice

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

func (*TxBody) GetGasPriceBigInt

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

func (*TxBody) GetNonce

func (x *TxBody) GetNonce() uint64

func (*TxBody) GetPayload

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

func (*TxBody) GetRecipient

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

func (*TxBody) GetSign

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

func (*TxBody) GetType

func (x *TxBody) GetType() TxType

func (*TxBody) ProtoMessage

func (*TxBody) ProtoMessage()

func (*TxBody) ProtoReflect added in v2.4.8

func (x *TxBody) ProtoReflect() protoreflect.Message

func (*TxBody) Reset

func (x *TxBody) Reset()

func (*TxBody) String

func (x *TxBody) String() string

type TxHash

type TxHash = []byte

type TxID

type TxID HashID

TxID is a HashID to identify a transaction

func ParseToTxID

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"`
	// contains filtered or unexported fields
}

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

func (*TxIdx) Descriptor deprecated

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

Deprecated: Use TxIdx.ProtoReflect.Descriptor instead.

func (*TxIdx) GetBlockHash

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

func (*TxIdx) GetIdx

func (x *TxIdx) GetIdx() int32

func (*TxIdx) ProtoMessage

func (*TxIdx) ProtoMessage()

func (*TxIdx) ProtoReflect added in v2.4.8

func (x *TxIdx) ProtoReflect() protoreflect.Message

func (*TxIdx) Reset

func (x *TxIdx) Reset()

func (*TxIdx) String

func (x *TxIdx) String() string

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"`
	// contains filtered or unexported fields
}

func (*TxInBlock) Descriptor deprecated

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

Deprecated: Use TxInBlock.ProtoReflect.Descriptor instead.

func (*TxInBlock) GetTx

func (x *TxInBlock) GetTx() *Tx

func (*TxInBlock) GetTxIdx

func (x *TxInBlock) GetTxIdx() *TxIdx

func (*TxInBlock) ProtoMessage

func (*TxInBlock) ProtoMessage()

func (*TxInBlock) ProtoReflect added in v2.4.8

func (x *TxInBlock) ProtoReflect() protoreflect.Message

func (*TxInBlock) Reset

func (x *TxInBlock) Reset()

func (*TxInBlock) String

func (x *TxInBlock) String() string

type TxList

type TxList struct {
	Txs []*Tx `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"`
	// contains filtered or unexported fields
}

func (*TxList) Descriptor deprecated

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

Deprecated: Use TxList.ProtoReflect.Descriptor instead.

func (*TxList) GetTxs

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

func (*TxList) ProtoMessage

func (*TxList) ProtoMessage()

func (*TxList) ProtoReflect added in v2.4.8

func (x *TxList) ProtoReflect() protoreflect.Message

func (*TxList) Reset

func (x *TxList) Reset()

func (*TxList) String

func (x *TxList) String() string

type TxType

type TxType int32
const (
	TxType_NORMAL        TxType = 0
	TxType_GOVERNANCE    TxType = 1
	TxType_REDEPLOY      TxType = 2
	TxType_FEEDELEGATION TxType = 3
	TxType_TRANSFER      TxType = 4
	TxType_CALL          TxType = 5
	TxType_DEPLOY        TxType = 6
)

func (TxType) Descriptor added in v2.4.8

func (TxType) Descriptor() protoreflect.EnumDescriptor

func (TxType) Enum added in v2.4.8

func (x TxType) Enum() *TxType

func (TxType) EnumDescriptor deprecated

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

Deprecated: Use TxType.Descriptor instead.

func (TxType) Number added in v2.4.8

func (x TxType) Number() protoreflect.EnumNumber

func (TxType) String

func (x TxType) String() string

func (TxType) Type added in v2.4.8

func (TxType) Type() protoreflect.EnumType

type UnimplementedAdminRPCServiceServer added in v2.4.8

type UnimplementedAdminRPCServiceServer struct {
}

UnimplementedAdminRPCServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedAdminRPCServiceServer) MempoolTx added in v2.4.8

func (UnimplementedAdminRPCServiceServer) MempoolTxStat added in v2.4.8

type UnimplementedAergoRPCServiceServer added in v2.4.8

type UnimplementedAergoRPCServiceServer struct {
}

UnimplementedAergoRPCServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedAergoRPCServiceServer) Blockchain added in v2.4.8

func (UnimplementedAergoRPCServiceServer) ChainStat added in v2.4.8

func (UnimplementedAergoRPCServiceServer) CommitTX added in v2.4.8

func (UnimplementedAergoRPCServiceServer) CreateAccount added in v2.4.8

func (UnimplementedAergoRPCServiceServer) ExportAccount added in v2.4.8

func (UnimplementedAergoRPCServiceServer) ExportAccountKeystore added in v2.4.8

func (UnimplementedAergoRPCServiceServer) GetABI added in v2.4.8

func (UnimplementedAergoRPCServiceServer) GetAccountVotes added in v2.4.8

func (UnimplementedAergoRPCServiceServer) GetAccounts added in v2.4.8

func (UnimplementedAergoRPCServiceServer) GetBlock added in v2.4.8

func (UnimplementedAergoRPCServiceServer) GetBlockBody added in v2.4.8

func (UnimplementedAergoRPCServiceServer) GetBlockMetadata added in v2.4.8

func (UnimplementedAergoRPCServiceServer) GetBlockTX added in v2.4.8

func (UnimplementedAergoRPCServiceServer) GetChainInfo added in v2.4.8

func (UnimplementedAergoRPCServiceServer) GetConfChangeProgress added in v2.4.8

func (UnimplementedAergoRPCServiceServer) GetConsensusInfo added in v2.4.8

func (UnimplementedAergoRPCServiceServer) GetEnterpriseConfig added in v2.4.8

func (UnimplementedAergoRPCServiceServer) GetNameInfo added in v2.4.8

func (UnimplementedAergoRPCServiceServer) GetPeers added in v2.4.8

func (UnimplementedAergoRPCServiceServer) GetReceipt added in v2.4.8

func (UnimplementedAergoRPCServiceServer) GetServerInfo added in v2.4.8

func (UnimplementedAergoRPCServiceServer) GetStaking added in v2.4.8

func (UnimplementedAergoRPCServiceServer) GetState added in v2.4.8

func (UnimplementedAergoRPCServiceServer) GetStateAndProof added in v2.4.8

func (UnimplementedAergoRPCServiceServer) GetTX added in v2.4.8

func (UnimplementedAergoRPCServiceServer) GetVotes added in v2.4.8

func (UnimplementedAergoRPCServiceServer) ImportAccount added in v2.4.8

func (UnimplementedAergoRPCServiceServer) ListBlockHeaders added in v2.4.8

func (UnimplementedAergoRPCServiceServer) ListBlockMetadata added in v2.4.8

func (UnimplementedAergoRPCServiceServer) ListBlockMetadataStream added in v2.4.8

func (UnimplementedAergoRPCServiceServer) ListBlockStream added in v2.4.8

func (UnimplementedAergoRPCServiceServer) ListEventStream added in v2.4.8

func (UnimplementedAergoRPCServiceServer) ListEvents added in v2.4.8

func (UnimplementedAergoRPCServiceServer) LockAccount added in v2.4.8

func (UnimplementedAergoRPCServiceServer) Metric added in v2.4.8

func (UnimplementedAergoRPCServiceServer) NodeState added in v2.4.8

func (UnimplementedAergoRPCServiceServer) QueryContract added in v2.4.8

func (UnimplementedAergoRPCServiceServer) QueryContractState added in v2.4.8

func (UnimplementedAergoRPCServiceServer) SendTX added in v2.4.8

func (UnimplementedAergoRPCServiceServer) SignTX added in v2.4.8

func (UnimplementedAergoRPCServiceServer) UnlockAccount added in v2.4.8

func (UnimplementedAergoRPCServiceServer) VerifyTX added in v2.4.8

type UnimplementedPolarisRPCServiceServer added in v2.4.8

type UnimplementedPolarisRPCServiceServer struct {
}

UnimplementedPolarisRPCServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedPolarisRPCServiceServer) AddBLEntry added in v2.4.8

func (UnimplementedPolarisRPCServiceServer) BlackList added in v2.4.8

func (UnimplementedPolarisRPCServiceServer) CurrentList added in v2.4.8

func (UnimplementedPolarisRPCServiceServer) ListBLEntries added in v2.4.8

func (UnimplementedPolarisRPCServiceServer) Metric added in v2.4.8

func (UnimplementedPolarisRPCServiceServer) NodeState added in v2.4.8

func (UnimplementedPolarisRPCServiceServer) RemoveBLEntry added in v2.4.8

func (UnimplementedPolarisRPCServiceServer) WhiteList added in v2.4.8

type UnsafeAdminRPCServiceServer added in v2.4.8

type UnsafeAdminRPCServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeAdminRPCServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AdminRPCServiceServer will result in compilation errors.

type UnsafeAergoRPCServiceServer added in v2.4.8

type UnsafeAergoRPCServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeAergoRPCServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AergoRPCServiceServer will result in compilation errors.

type UnsafePolarisRPCServiceServer added in v2.4.8

type UnsafePolarisRPCServiceServer interface {
	// contains filtered or unexported methods
}

UnsafePolarisRPCServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PolarisRPCServiceServer will result in compilation errors.

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"`
	// contains filtered or unexported fields
}

func (*VerifyResult) Descriptor deprecated

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

Deprecated: Use VerifyResult.ProtoReflect.Descriptor instead.

func (*VerifyResult) GetError

func (x *VerifyResult) GetError() VerifyStatus

func (*VerifyResult) GetTx

func (x *VerifyResult) GetTx() *Tx

func (*VerifyResult) ProtoMessage

func (*VerifyResult) ProtoMessage()

func (*VerifyResult) ProtoReflect added in v2.4.8

func (x *VerifyResult) ProtoReflect() protoreflect.Message

func (*VerifyResult) Reset

func (x *VerifyResult) Reset()

func (*VerifyResult) String

func (x *VerifyResult) String() string

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 //TODO: not yet impl
)

func (VerifyStatus) Descriptor added in v2.4.8

func (VerifyStatus) Enum added in v2.4.8

func (x VerifyStatus) Enum() *VerifyStatus

func (VerifyStatus) EnumDescriptor deprecated

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

Deprecated: Use VerifyStatus.Descriptor instead.

func (VerifyStatus) Number added in v2.4.8

func (VerifyStatus) String

func (x VerifyStatus) String() string

func (VerifyStatus) Type added in v2.4.8

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"`
	// contains filtered or unexported fields
}

func (*Vote) Descriptor deprecated

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

Deprecated: Use Vote.ProtoReflect.Descriptor instead.

func (*Vote) GetAmount

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

func (*Vote) GetAmountBigInt

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

func (*Vote) GetCandidate

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

func (*Vote) ProtoMessage

func (*Vote) ProtoMessage()

func (*Vote) ProtoReflect added in v2.4.8

func (x *Vote) ProtoReflect() protoreflect.Message

func (*Vote) Reset

func (x *Vote) Reset()

func (*Vote) String

func (x *Vote) String() string

type VoteInfo

type VoteInfo struct {
	Id         string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Candidates []string `protobuf:"bytes,2,rep,name=candidates,proto3" json:"candidates,omitempty"`
	Amount     string   `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"`
	// contains filtered or unexported fields
}

func (*VoteInfo) Descriptor deprecated

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

Deprecated: Use VoteInfo.ProtoReflect.Descriptor instead.

func (*VoteInfo) GetAmount

func (x *VoteInfo) GetAmount() string

func (*VoteInfo) GetCandidates

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

func (*VoteInfo) GetId

func (x *VoteInfo) GetId() string

func (*VoteInfo) ProtoMessage

func (*VoteInfo) ProtoMessage()

func (*VoteInfo) ProtoReflect added in v2.4.8

func (x *VoteInfo) ProtoReflect() protoreflect.Message

func (*VoteInfo) Reset

func (x *VoteInfo) Reset()

func (*VoteInfo) String

func (x *VoteInfo) String() string

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"`
	// contains filtered or unexported fields
}

func (*VoteList) Descriptor deprecated

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

Deprecated: Use VoteList.ProtoReflect.Descriptor instead.

func (*VoteList) GetId

func (x *VoteList) GetId() string

func (*VoteList) GetVotes

func (x *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) ProtoReflect added in v2.4.8

func (x *VoteList) ProtoReflect() protoreflect.Message

func (*VoteList) Reset

func (x *VoteList) Reset()

func (*VoteList) String

func (x *VoteList) String() string

func (VoteList) Swap

func (vl VoteList) Swap(i, j int)

type VoteParams

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"`
	// contains filtered or unexported fields
}

func (*VoteParams) Descriptor deprecated

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

Deprecated: Use VoteParams.ProtoReflect.Descriptor instead.

func (*VoteParams) GetCount

func (x *VoteParams) GetCount() uint32

func (*VoteParams) GetId

func (x *VoteParams) GetId() string

func (*VoteParams) ProtoMessage

func (*VoteParams) ProtoMessage()

func (*VoteParams) ProtoReflect added in v2.4.8

func (x *VoteParams) ProtoReflect() protoreflect.Message

func (*VoteParams) Reset

func (x *VoteParams) Reset()

func (*VoteParams) String

func (x *VoteParams) String() string

type VotingIssue

type VotingIssue interface {
	ID() string
	Key() []byte
}

func GetVotingIssues

func GetVotingIssues() []VotingIssue

GetVotingIssues returns all the VotingIssues in this package.

type WhiteListEntry

type WhiteListEntry struct {
	IpNet  *net.IPNet
	PeerID PeerID
	// contains filtered or unexported fields
}

func NewListEntry

func NewListEntry(raw RawEntry) (WhiteListEntry, error)

func ParseListEntry

func ParseListEntry(str string) (WhiteListEntry, error)

func ReadEntries

func ReadEntries(jsonBytes []byte) ([]WhiteListEntry, error)

func (WhiteListEntry) Contains

func (e WhiteListEntry) Contains(addr net.IP, pid PeerID) bool

func (WhiteListEntry) String

func (e WhiteListEntry) String() string

Directories

Path Synopsis
package dbkey contains a key prefix collection of low level database accessors.
package dbkey contains a key prefix collection of low level database accessors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL