types

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2021 License: Apache-2.0 Imports: 32 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Fabric string = "fabric"
)
View Source
const (
	ModuleName = "fabric"
)

Variables

View Source
var (
	ErrInvalidLengthFabric        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowFabric          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupFabric = fmt.Errorf("proto: unexpected end of group")
)
View Source
var MSPHeaderType_name = map[int32]string{
	0: "MSP_HEADER_TYPE_CREATE",
	1: "MSP_HEADER_TYPE_UPDATE_POLICY",
	2: "MSP_HEADER_TYPE_UPDATE_CONFIG",
	3: "MSP_HEADER_TYPE_FREEZE",
}
View Source
var MSPHeaderType_value = map[string]int32{
	"MSP_HEADER_TYPE_CREATE":        0,
	"MSP_HEADER_TYPE_UPDATE_POLICY": 1,
	"MSP_HEADER_TYPE_UPDATE_CONFIG": 2,
	"MSP_HEADER_TYPE_FREEZE":        3,
}
View Source
var MakeSequenceCommitmentEntryKey = commitment.MakeSequenceCommitmentEntryKey
View Source
var (
	// ModuleCdc references the global x/ibc-transfer module codec. Note, the codec
	// should ONLY be used in certain instances of tests and for JSON encoding.
	//
	// The actual codec used for serialization should be provided to x/ibc-transfer and
	// defined at the application level.
	ModuleCdc = codec.NewProtoCodec(codectypes.NewInterfaceRegistry())
)

Functions

func CompareMSPID

func CompareMSPID(a, b string) int

returns an integer comparing two MSPIDs. the result will be 0 if a==b, -1 if a < b, and +1 if a > b.

func RegisterInterfaces

func RegisterInterfaces(registry codectypes.InterfaceRegistry)

RegisterInterfaces registers the tendermint concrete client-related implementations and interfaces.

func VerifyChaincodeHeader

func VerifyChaincodeHeader(clientState ClientState, h ChaincodeHeader) error

VerifyChaincodeHeader verifies ChaincodeHeader with last Endorsement Policy

func VerifyChaincodeInfo

func VerifyChaincodeInfo(clientState ClientState, info ChaincodeInfo) error

VerifyChaincodeInfo verifies ChaincodeInfo with last IBC Policy

func VerifyEndorsedCommitment

func VerifyEndorsedCommitment(ccID peer.ChaincodeID, policyBytes []byte, proof CommitmentProof, key string, value []byte, configs []MSPPBConfig) (bool, error)

VerifyEndorsedCommitment verifies a key-value entry with a policy

func VerifyEndorsedMessage

func VerifyEndorsedMessage(policyBytes []byte, proof MessageProof, value []byte, configs []MSPPBConfig) error

VerifyEndorsedMessage verifies a value with given policy

func VerifyMSPHeader

func VerifyMSPHeader(clientState ClientState, mh MSPHeader) error

verify whether MSPHeader suits the last MSPInfos. assume MSPHeader.ValidateBasic() is nil

func VerifyMSPHeaders

func VerifyMSPHeaders(clientState ClientState, mhs MSPHeaders) error

Types

type ChaincodeHeader

type ChaincodeHeader struct {
	Sequence commitment.Sequence `protobuf:"bytes,1,opt,name=sequence,proto3" json:"sequence"`
	Proof    CommitmentProof     `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof"`
}

func NewChaincodeHeader

func NewChaincodeHeader(seq uint64, timestamp int64, proof CommitmentProof) ChaincodeHeader

func (*ChaincodeHeader) Descriptor

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

func (*ChaincodeHeader) Marshal

func (m *ChaincodeHeader) Marshal() (dAtA []byte, err error)

func (*ChaincodeHeader) MarshalTo

func (m *ChaincodeHeader) MarshalTo(dAtA []byte) (int, error)

func (*ChaincodeHeader) MarshalToSizedBuffer

func (m *ChaincodeHeader) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ChaincodeHeader) ProtoMessage

func (*ChaincodeHeader) ProtoMessage()

func (*ChaincodeHeader) Reset

func (m *ChaincodeHeader) Reset()

func (*ChaincodeHeader) Size

func (m *ChaincodeHeader) Size() (n int)

func (*ChaincodeHeader) String

func (m *ChaincodeHeader) String() string

func (*ChaincodeHeader) Unmarshal

func (m *ChaincodeHeader) Unmarshal(dAtA []byte) error

func (ChaincodeHeader) ValidateBasic

func (h ChaincodeHeader) ValidateBasic() error

func (*ChaincodeHeader) XXX_DiscardUnknown

func (m *ChaincodeHeader) XXX_DiscardUnknown()

func (*ChaincodeHeader) XXX_Marshal

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

func (*ChaincodeHeader) XXX_Merge

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

func (*ChaincodeHeader) XXX_Size

func (m *ChaincodeHeader) XXX_Size() int

func (*ChaincodeHeader) XXX_Unmarshal

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

type ChaincodeID

type ChaincodeID struct {
	//deploy transaction will use the path
	Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	//all other requests will use the name (really a hashcode) generated by
	//the deploy transaction
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	//user friendly version name for the chaincode
	Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
}

ref. https://github.com/hyperledger/fabric-chaincode-java/blob/392cf9cb740c42e0376ecdbbb015285b5a74ba97/fabric-chaincode-protos/src/main/protos/peer/chaincode.proto#L21

func (*ChaincodeID) Descriptor

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

func (*ChaincodeID) Marshal

func (m *ChaincodeID) Marshal() (dAtA []byte, err error)

func (*ChaincodeID) MarshalTo

func (m *ChaincodeID) MarshalTo(dAtA []byte) (int, error)

func (*ChaincodeID) MarshalToSizedBuffer

func (m *ChaincodeID) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ChaincodeID) ProtoMessage

func (*ChaincodeID) ProtoMessage()

func (*ChaincodeID) Reset

func (m *ChaincodeID) Reset()

func (*ChaincodeID) Size

func (m *ChaincodeID) Size() (n int)

func (*ChaincodeID) String

func (m *ChaincodeID) String() string

func (*ChaincodeID) Unmarshal

func (m *ChaincodeID) Unmarshal(dAtA []byte) error

func (*ChaincodeID) XXX_DiscardUnknown

func (m *ChaincodeID) XXX_DiscardUnknown()

func (*ChaincodeID) XXX_Marshal

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

func (*ChaincodeID) XXX_Merge

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

func (*ChaincodeID) XXX_Size

func (m *ChaincodeID) XXX_Size() int

func (*ChaincodeID) XXX_Unmarshal

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

type ChaincodeInfo

type ChaincodeInfo struct {
	ChannelId         string        `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
	ChaincodeId       ChaincodeID   `protobuf:"bytes,2,opt,name=chaincode_id,json=chaincodeId,proto3" json:"chaincode_id"`
	EndorsementPolicy []byte        `protobuf:"bytes,3,opt,name=endorsement_policy,json=endorsementPolicy,proto3" json:"endorsement_policy,omitempty"`
	IbcPolicy         []byte        `protobuf:"bytes,4,opt,name=ibc_policy,json=ibcPolicy,proto3" json:"ibc_policy,omitempty"`
	Proof             *MessageProof `protobuf:"bytes,5,opt,name=proof,proto3" json:"proof,omitempty"`
}

func NewChaincodeInfo

func NewChaincodeInfo(chanID string, ccID ChaincodeID, endorsementPolicy, ibcPolicy []byte, proof *MessageProof) ChaincodeInfo

func (*ChaincodeInfo) Descriptor

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

func (ChaincodeInfo) GetChainID

func (ci ChaincodeInfo) GetChainID() string

func (ChaincodeInfo) GetFabricChaincodeID

func (ci ChaincodeInfo) GetFabricChaincodeID() peer.ChaincodeID

func (ChaincodeInfo) GetSignBytes

func (ci ChaincodeInfo) GetSignBytes() []byte

func (*ChaincodeInfo) Marshal

func (m *ChaincodeInfo) Marshal() (dAtA []byte, err error)

func (*ChaincodeInfo) MarshalTo

func (m *ChaincodeInfo) MarshalTo(dAtA []byte) (int, error)

func (*ChaincodeInfo) MarshalToSizedBuffer

func (m *ChaincodeInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ChaincodeInfo) ProtoMessage

func (*ChaincodeInfo) ProtoMessage()

func (*ChaincodeInfo) Reset

func (m *ChaincodeInfo) Reset()

func (*ChaincodeInfo) Size

func (m *ChaincodeInfo) Size() (n int)

func (*ChaincodeInfo) String

func (m *ChaincodeInfo) String() string

func (*ChaincodeInfo) Unmarshal

func (m *ChaincodeInfo) Unmarshal(dAtA []byte) error

func (ChaincodeInfo) ValidateBasic

func (ci ChaincodeInfo) ValidateBasic() error

func (*ChaincodeInfo) XXX_DiscardUnknown

func (m *ChaincodeInfo) XXX_DiscardUnknown()

func (*ChaincodeInfo) XXX_Marshal

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

func (*ChaincodeInfo) XXX_Merge

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

func (*ChaincodeInfo) XXX_Size

func (m *ChaincodeInfo) XXX_Size() int

func (*ChaincodeInfo) XXX_Unmarshal

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

type ClientState

type ClientState struct {
	Id                  string          `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	LastChaincodeHeader ChaincodeHeader `protobuf:"bytes,2,opt,name=last_chaincode_header,json=lastChaincodeHeader,proto3" json:"last_chaincode_header"`
	LastChaincodeInfo   ChaincodeInfo   `protobuf:"bytes,3,opt,name=last_chaincode_info,json=lastChaincodeInfo,proto3" json:"last_chaincode_info"`
	LastMspInfos        MSPInfos        `protobuf:"bytes,4,opt,name=last_msp_infos,json=lastMspInfos,proto3" json:"last_msp_infos"`
}

func NewClientState

func NewClientState(
	id string,
	chaincodeHeader ChaincodeHeader,
	chaincodeInfo ChaincodeInfo,
	mspInfos MSPInfos,
) *ClientState

NewClientState creates a new ClientState instance

func (ClientState) CheckHeaderAndUpdateState

func (cs ClientState) CheckHeaderAndUpdateState(
	ctx sdk.Context, cdc codec.BinaryMarshaler, clientStore sdk.KVStore,
	header exported.Header,
) (exported.ClientState, exported.ConsensusState, error)

CheckHeaderAndUpdateState checks if the provided header is valid and updates the consensus state if appropriate. It returns an error if: - the header provided is not parseable to a solo machine header - the header sequence does not match the current sequence - the header timestamp is less than the consensus state timestamp - the currently registered public key did not provide the update signature

func (ClientState) CheckMisbehaviourAndUpdateState

func (cs ClientState) CheckMisbehaviourAndUpdateState(
	ctx sdk.Context,
	cdc codec.BinaryMarshaler,
	clientStore sdk.KVStore,
	misbehaviour exported.Misbehaviour,
) (exported.ClientState, error)

func (ClientState) CheckProposedHeaderAndUpdateState

func (cs ClientState) CheckProposedHeaderAndUpdateState(
	ctx sdk.Context, cdc codec.BinaryMarshaler, clientStore sdk.KVStore,
	header exported.Header,
) (exported.ClientState, exported.ConsensusState, error)

func (ClientState) ClientType

func (cs ClientState) ClientType() string

ClientType is localhost.

func (*ClientState) Descriptor

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

func (ClientState) GetChainID

func (cs ClientState) GetChainID() string

GetChainID returns an empty string

func (ClientState) GetFrozenHeight

func (cs ClientState) GetFrozenHeight() exported.Height

GetFrozenHeight returns the frozen sequence of the client. Return exported.Height to satisfy interface

func (ClientState) GetID

func (cs ClientState) GetID() string

GetID returns the loop-back client state identifier.

func (ClientState) GetLatestHeight

func (cs ClientState) GetLatestHeight() exported.Height

GetLatestHeight returns the latest height.

func (ClientState) GetLatestTimestamp

func (cs ClientState) GetLatestTimestamp() int64

GetLatestTimestamp returns latest block time.

func (ClientState) GetProofSpecs

func (cs ClientState) GetProofSpecs() []*ics23.ProofSpec

GetProofSpecs returns the format the client expects for proof verification as a string array specifying the proof type for each position in chained proof

func (ClientState) IsFrozen

func (cs ClientState) IsFrozen() bool

IsFrozen returns false.

func (*ClientState) Marshal

func (m *ClientState) Marshal() (dAtA []byte, err error)

func (*ClientState) MarshalTo

func (m *ClientState) MarshalTo(dAtA []byte) (int, error)

func (*ClientState) MarshalToSizedBuffer

func (m *ClientState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ClientState) ProtoMessage

func (*ClientState) ProtoMessage()

func (*ClientState) Reset

func (m *ClientState) Reset()

func (*ClientState) Size

func (m *ClientState) Size() (n int)

func (*ClientState) String

func (m *ClientState) String() string

func (*ClientState) Unmarshal

func (m *ClientState) Unmarshal(dAtA []byte) error

func (ClientState) Validate

func (cs ClientState) Validate() error

Validate performs a basic validation of the client state fields.

func (ClientState) VerifyChannelState

func (cs ClientState) VerifyChannelState(
	store sdk.KVStore,
	cdc codec.BinaryMarshaler,
	height exported.Height,
	prefix exported.Prefix,
	proof []byte,
	portID,
	channelID string,
	channel exported.ChannelI,
) error

VerifyChannelState verifies a proof of the channel state of the specified channel end, under the specified port, stored on the target machine.

func (ClientState) VerifyClientConsensusState

func (cs ClientState) VerifyClientConsensusState(
	store sdk.KVStore,
	cdc codec.BinaryMarshaler,
	height exported.Height,
	counterpartyClientIdentifier string,
	consensusHeight exported.Height,
	prefix exported.Prefix,
	proof []byte,
	consensusState exported.ConsensusState,
) error

VerifyClientConsensusState verifies a proof of the consensus state of the fabric client stored on the target machine.

func (ClientState) VerifyClientState

func (cs ClientState) VerifyClientState(
	store sdk.KVStore,
	cdc codec.BinaryMarshaler,
	height exported.Height,
	prefix exported.Prefix,
	counterpartyClientIdentifier string,
	proof []byte,
	clientState exported.ClientState,
) error

VerifyClientState verifies a proof of the client state of the running chain stored on the target machine

func (ClientState) VerifyConnectionState

func (cs ClientState) VerifyConnectionState(
	store sdk.KVStore,
	cdc codec.BinaryMarshaler,
	height exported.Height,
	prefix exported.Prefix,
	proof []byte,
	connectionID string,
	connectionEnd exported.ConnectionI,
) error

VerifyConnectionState verifies a proof of the connection state of the specified connection end stored locally.

func (ClientState) VerifyNextSequenceRecv

func (cs ClientState) VerifyNextSequenceRecv(
	store sdk.KVStore,
	cdc codec.BinaryMarshaler,
	height exported.Height,
	prefix exported.Prefix,
	proof []byte,
	portID,
	channelID string,
	nextSequenceRecv uint64,
) error

VerifyNextSequenceRecv verifies a proof of the next sequence number to be received of the specified channel at the specified port.

func (ClientState) VerifyPacketAcknowledgement

func (cs ClientState) VerifyPacketAcknowledgement(
	store sdk.KVStore,
	cdc codec.BinaryMarshaler,
	height exported.Height,
	prefix exported.Prefix,
	proof []byte,
	portID,
	channelID string,
	sequence uint64,
	acknowledgement []byte,
) error

VerifyPacketAcknowledgement verifies a proof of an incoming packet acknowledgement at the specified port, specified channel, and specified sequence.

func (ClientState) VerifyPacketCommitment

func (cs ClientState) VerifyPacketCommitment(
	store sdk.KVStore,
	cdc codec.BinaryMarshaler,
	height exported.Height,
	prefix exported.Prefix,
	proof []byte,
	portID,
	channelID string,
	sequence uint64,
	commitmentBytes []byte,
) error

VerifyPacketCommitment verifies a proof of an outgoing packet commitment at the specified port, specified channel, and specified sequence.

func (ClientState) VerifyPacketReceiptAbsence

func (cs ClientState) VerifyPacketReceiptAbsence(
	store sdk.KVStore,
	cdc codec.BinaryMarshaler,
	height exported.Height,
	prefix exported.Prefix,
	proof []byte,
	portID,
	channelID string,
	sequence uint64,
) error

VerifyPacketAcknowledgementAbsence verifies a proof of the absence of an incoming packet acknowledgement at the specified port, specified channel, and specified sequence.

func (ClientState) VerifyUpgrade

VerifyUpgrade returns an error since solomachine client does not support upgrades

func (*ClientState) XXX_DiscardUnknown

func (m *ClientState) XXX_DiscardUnknown()

func (*ClientState) XXX_Marshal

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

func (*ClientState) XXX_Merge

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

func (*ClientState) XXX_Size

func (m *ClientState) XXX_Size() int

func (*ClientState) XXX_Unmarshal

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

func (ClientState) ZeroCustomFields

func (cs ClientState) ZeroCustomFields() exported.ClientState

ZeroCustomFields returns solomachine client state with client-specific fields FrozenSequence, and AllowUpdateAfterProposal zeroed out

type CommitmentProof

type CommitmentProof struct {
	Proposal      []byte   `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal,omitempty"`
	NsIndex       uint32   `protobuf:"varint,2,opt,name=ns_index,json=nsIndex,proto3" json:"ns_index,omitempty"`
	WriteSetIndex uint32   `protobuf:"varint,3,opt,name=write_set_index,json=writeSetIndex,proto3" json:"write_set_index,omitempty"`
	Identities    [][]byte `protobuf:"bytes,4,rep,name=identities,proto3" json:"identities,omitempty"`
	Signatures    [][]byte `protobuf:"bytes,5,rep,name=signatures,proto3" json:"signatures,omitempty"`
}

func (*CommitmentProof) Descriptor

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

func (CommitmentProof) Empty

func (proof CommitmentProof) Empty() bool

IsEmpty returns trie if the signature is emtpy.

func (*CommitmentProof) Equal

func (this *CommitmentProof) Equal(that interface{}) bool

func (*CommitmentProof) Marshal

func (m *CommitmentProof) Marshal() (dAtA []byte, err error)

func (*CommitmentProof) MarshalTo

func (m *CommitmentProof) MarshalTo(dAtA []byte) (int, error)

func (*CommitmentProof) MarshalToSizedBuffer

func (m *CommitmentProof) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CommitmentProof) ProtoMessage

func (*CommitmentProof) ProtoMessage()

func (*CommitmentProof) Reset

func (m *CommitmentProof) Reset()

func (*CommitmentProof) Size

func (m *CommitmentProof) Size() (n int)

func (*CommitmentProof) String

func (m *CommitmentProof) String() string

func (CommitmentProof) ToSignedData

func (proof CommitmentProof) ToSignedData() []*protoutil.SignedData

ToSignedData returns SignedData slice built with CommitmentProof

func (*CommitmentProof) Unmarshal

func (m *CommitmentProof) Unmarshal(dAtA []byte) error

func (CommitmentProof) ValidateBasic

func (proof CommitmentProof) ValidateBasic() error

ValidateBasic checks if the proof is empty.

func (CommitmentProof) VerifyMembership

func (CommitmentProof) VerifyMembership([]*ics23.ProofSpec, exported.Root, exported.Path, []byte) error

VerifyMembership implements ProofI.

func (CommitmentProof) VerifyNonMembership

func (CommitmentProof) VerifyNonMembership([]*ics23.ProofSpec, exported.Root, exported.Path) error

VerifyNonMembership implements ProofI.

func (*CommitmentProof) XXX_DiscardUnknown

func (m *CommitmentProof) XXX_DiscardUnknown()

func (*CommitmentProof) XXX_Marshal

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

func (*CommitmentProof) XXX_Merge

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

func (*CommitmentProof) XXX_Size

func (m *CommitmentProof) XXX_Size() int

func (*CommitmentProof) XXX_Unmarshal

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

type Config

type Config struct {
	MSPsDir string
	MSPIDs  []string
}

func DefaultConfig

func DefaultConfig() (Config, error)

type ConsensusState

type ConsensusState struct {
	Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
}

func GetConsensusState

func GetConsensusState(store sdk.KVStore, cdc codec.BinaryMarshaler, height exported.Height) (*ConsensusState, error)

GetConsensusState retrieves the consensus state from the client prefixed store. An error is returned if the consensus state does not exist.

func NewConsensusState

func NewConsensusState(
	timestamp int64,
) *ConsensusState

func (ConsensusState) ClientType

func (cs ConsensusState) ClientType() string

func (*ConsensusState) Descriptor

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

func (ConsensusState) GetRoot

func (cs ConsensusState) GetRoot() exported.Root

func (ConsensusState) GetTimestamp

func (cs ConsensusState) GetTimestamp() uint64

func (*ConsensusState) Marshal

func (m *ConsensusState) Marshal() (dAtA []byte, err error)

func (*ConsensusState) MarshalTo

func (m *ConsensusState) MarshalTo(dAtA []byte) (int, error)

func (*ConsensusState) MarshalToSizedBuffer

func (m *ConsensusState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ConsensusState) ProtoMessage

func (*ConsensusState) ProtoMessage()

func (*ConsensusState) Reset

func (m *ConsensusState) Reset()

func (*ConsensusState) Size

func (m *ConsensusState) Size() (n int)

func (*ConsensusState) String

func (m *ConsensusState) String() string

func (*ConsensusState) Unmarshal

func (m *ConsensusState) Unmarshal(dAtA []byte) error

func (ConsensusState) ValidateBasic

func (cs ConsensusState) ValidateBasic() error

ValidateBasic defines a basic validation for the tendermint consensus state.

func (*ConsensusState) XXX_DiscardUnknown

func (m *ConsensusState) XXX_DiscardUnknown()

func (*ConsensusState) XXX_Marshal

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

func (*ConsensusState) XXX_Merge

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

func (*ConsensusState) XXX_Size

func (m *ConsensusState) XXX_Size() int

func (*ConsensusState) XXX_Unmarshal

func (m *ConsensusState) XXX_Unmarshal(b []byte) error
type Header struct {
	ChaincodeHeader *ChaincodeHeader `protobuf:"bytes,1,opt,name=ChaincodeHeader,proto3" json:"ChaincodeHeader,omitempty"`
	ChaincodeInfo   *ChaincodeInfo   `protobuf:"bytes,2,opt,name=ChaincodeInfo,proto3" json:"ChaincodeInfo,omitempty"`
	MSPHeaders      *MSPHeaders      `protobuf:"bytes,3,opt,name=MSPHeaders,proto3" json:"MSPHeaders,omitempty"`
}

func NewHeader

func NewHeader(cheader *ChaincodeHeader, cinfo *ChaincodeInfo, mheaders *MSPHeaders) *Header

func (Header) ClientType

func (h Header) ClientType() string

func (*Header) Descriptor

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

func (Header) GetHeight

func (h Header) GetHeight() exported.Height

func (*Header) Marshal

func (m *Header) Marshal() (dAtA []byte, err error)

func (*Header) MarshalTo

func (m *Header) MarshalTo(dAtA []byte) (int, error)

func (*Header) MarshalToSizedBuffer

func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Header) ProtoMessage

func (*Header) ProtoMessage()

func (*Header) Reset

func (m *Header) Reset()

func (*Header) Size

func (m *Header) Size() (n int)

func (*Header) String

func (m *Header) String() string

func (*Header) Unmarshal

func (m *Header) Unmarshal(dAtA []byte) error

func (Header) ValidateBasic

func (h Header) ValidateBasic() error

func (*Header) XXX_DiscardUnknown

func (m *Header) XXX_DiscardUnknown()

func (*Header) XXX_Marshal

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

func (*Header) XXX_Merge

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

func (*Header) XXX_Size

func (m *Header) XXX_Size() int

func (*Header) XXX_Unmarshal

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

type MSPHeader

type MSPHeader struct {
	Type   MSPHeaderType `protobuf:"varint,1,opt,name=type,proto3,enum=ibc.lightclients.fabric.v1.MSPHeaderType" json:"type,omitempty"`
	MSPID  string        `protobuf:"bytes,2,opt,name=msp_id,json=mspId,proto3" json:"msp_id,omitempty"`
	Config []byte        `protobuf:"bytes,3,opt,name=config,proto3" json:"config,omitempty"`
	Policy []byte        `protobuf:"bytes,4,opt,name=policy,proto3" json:"policy,omitempty"`
	Proof  *MessageProof `protobuf:"bytes,5,opt,name=proof,proto3" json:"proof,omitempty"`
}

func NewMSPHeader

func NewMSPHeader(mhType MSPHeaderType, mspID string, config []byte, policy []byte, proof *MessageProof) MSPHeader

func (*MSPHeader) Descriptor

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

func (MSPHeader) GetSignBytes

func (mh MSPHeader) GetSignBytes() []byte

func (*MSPHeader) Marshal

func (m *MSPHeader) Marshal() (dAtA []byte, err error)

func (*MSPHeader) MarshalTo

func (m *MSPHeader) MarshalTo(dAtA []byte) (int, error)

func (*MSPHeader) MarshalToSizedBuffer

func (m *MSPHeader) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MSPHeader) ProtoMessage

func (*MSPHeader) ProtoMessage()

func (*MSPHeader) Reset

func (m *MSPHeader) Reset()

func (*MSPHeader) Size

func (m *MSPHeader) Size() (n int)

func (*MSPHeader) String

func (m *MSPHeader) String() string

func (*MSPHeader) Unmarshal

func (m *MSPHeader) Unmarshal(dAtA []byte) error

func (MSPHeader) ValidateBasic

func (mh MSPHeader) ValidateBasic() error

func (*MSPHeader) XXX_DiscardUnknown

func (m *MSPHeader) XXX_DiscardUnknown()

func (*MSPHeader) XXX_Marshal

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

func (*MSPHeader) XXX_Merge

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

func (*MSPHeader) XXX_Size

func (m *MSPHeader) XXX_Size() int

func (*MSPHeader) XXX_Unmarshal

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

type MSPHeaderType

type MSPHeaderType int32
const (
	MSPHeaderTypeCreate       MSPHeaderType = 0
	MSPHeaderTypeUpdatePolicy MSPHeaderType = 1
	MSPHeaderTypeUpdateConfig MSPHeaderType = 2
	MSPHeaderTypeFreeze       MSPHeaderType = 3
)

func (MSPHeaderType) EnumDescriptor

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

func (MSPHeaderType) String

func (x MSPHeaderType) String() string

type MSPHeaders

type MSPHeaders struct {
	Headers []MSPHeader `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers"`
}

func NewMSPHeaders

func NewMSPHeaders(headers []MSPHeader) MSPHeaders

func (*MSPHeaders) Descriptor

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

func (*MSPHeaders) Marshal

func (m *MSPHeaders) Marshal() (dAtA []byte, err error)

func (*MSPHeaders) MarshalTo

func (m *MSPHeaders) MarshalTo(dAtA []byte) (int, error)

func (*MSPHeaders) MarshalToSizedBuffer

func (m *MSPHeaders) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MSPHeaders) ProtoMessage

func (*MSPHeaders) ProtoMessage()

func (*MSPHeaders) Reset

func (m *MSPHeaders) Reset()

func (*MSPHeaders) Size

func (m *MSPHeaders) Size() (n int)

func (*MSPHeaders) String

func (m *MSPHeaders) String() string

func (*MSPHeaders) Unmarshal

func (m *MSPHeaders) Unmarshal(dAtA []byte) error

func (MSPHeaders) ValidateBasic

func (mhs MSPHeaders) ValidateBasic() error

func (*MSPHeaders) XXX_DiscardUnknown

func (m *MSPHeaders) XXX_DiscardUnknown()

func (*MSPHeaders) XXX_Marshal

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

func (*MSPHeaders) XXX_Merge

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

func (*MSPHeaders) XXX_Size

func (m *MSPHeaders) XXX_Size() int

func (*MSPHeaders) XXX_Unmarshal

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

type MSPInfo

type MSPInfo struct {
	MSPID   string `protobuf:"bytes,1,opt,name=msp_id,json=mspId,proto3" json:"msp_id,omitempty"`
	Config  []byte `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
	Policy  []byte `protobuf:"bytes,3,opt,name=policy,proto3" json:"policy,omitempty"`
	Freezed bool   `protobuf:"varint,4,opt,name=freezed,proto3" json:"freezed,omitempty"`
}

func NewMSPInfo

func NewMSPInfo(mspID string, config, policy []byte) MSPInfo

func (*MSPInfo) Descriptor

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

func (*MSPInfo) Marshal

func (m *MSPInfo) Marshal() (dAtA []byte, err error)

func (*MSPInfo) MarshalTo

func (m *MSPInfo) MarshalTo(dAtA []byte) (int, error)

func (*MSPInfo) MarshalToSizedBuffer

func (m *MSPInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MSPInfo) ProtoMessage

func (*MSPInfo) ProtoMessage()

func (*MSPInfo) Reset

func (m *MSPInfo) Reset()

func (*MSPInfo) Size

func (m *MSPInfo) Size() (n int)

func (*MSPInfo) String

func (m *MSPInfo) String() string

func (*MSPInfo) Unmarshal

func (m *MSPInfo) Unmarshal(dAtA []byte) error

func (*MSPInfo) XXX_DiscardUnknown

func (m *MSPInfo) XXX_DiscardUnknown()

func (*MSPInfo) XXX_Marshal

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

func (*MSPInfo) XXX_Merge

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

func (*MSPInfo) XXX_Size

func (m *MSPInfo) XXX_Size() int

func (*MSPInfo) XXX_Unmarshal

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

type MSPInfos

type MSPInfos struct {
	Infos []MSPInfo `protobuf:"bytes,1,rep,name=infos,proto3" json:"infos"`
}

func (*MSPInfos) Descriptor

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

func (MSPInfos) FindMSPInfo

func (mi MSPInfos) FindMSPInfo(mspID string) (*MSPInfo, error)

func (MSPInfos) GetMSPPBConfigs

func (mi MSPInfos) GetMSPPBConfigs() ([]MSPPBConfig, error)

func (MSPInfos) HasMSPID

func (mi MSPInfos) HasMSPID(mspID string) bool

return true whether the target MSPInfo is freezed or not

func (MSPInfos) IndexOf

func (mi MSPInfos) IndexOf(mspID string) int

func (*MSPInfos) Marshal

func (m *MSPInfos) Marshal() (dAtA []byte, err error)

func (*MSPInfos) MarshalTo

func (m *MSPInfos) MarshalTo(dAtA []byte) (int, error)

func (*MSPInfos) MarshalToSizedBuffer

func (m *MSPInfos) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MSPInfos) ProtoMessage

func (*MSPInfos) ProtoMessage()

func (*MSPInfos) Reset

func (m *MSPInfos) Reset()

func (*MSPInfos) Size

func (m *MSPInfos) Size() (n int)

func (*MSPInfos) String

func (m *MSPInfos) String() string

func (*MSPInfos) Unmarshal

func (m *MSPInfos) Unmarshal(dAtA []byte) error

func (*MSPInfos) XXX_DiscardUnknown

func (m *MSPInfos) XXX_DiscardUnknown()

func (*MSPInfos) XXX_Marshal

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

func (*MSPInfos) XXX_Merge

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

func (*MSPInfos) XXX_Size

func (m *MSPInfos) XXX_Size() int

func (*MSPInfos) XXX_Unmarshal

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

type MSPPBConfig

type MSPPBConfig = msppb.MSPConfig

XXX we need better alias name

type MessageProof

type MessageProof struct {
	Identities [][]byte `protobuf:"bytes,1,rep,name=identities,proto3" json:"identities,omitempty"`
	Signatures [][]byte `protobuf:"bytes,2,rep,name=signatures,proto3" json:"signatures,omitempty"`
}

func (*MessageProof) Descriptor

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

func (*MessageProof) Equal

func (this *MessageProof) Equal(that interface{}) bool

func (*MessageProof) Marshal

func (m *MessageProof) Marshal() (dAtA []byte, err error)

func (*MessageProof) MarshalTo

func (m *MessageProof) MarshalTo(dAtA []byte) (int, error)

func (*MessageProof) MarshalToSizedBuffer

func (m *MessageProof) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MessageProof) ProtoMessage

func (*MessageProof) ProtoMessage()

func (*MessageProof) Reset

func (m *MessageProof) Reset()

func (*MessageProof) Size

func (m *MessageProof) Size() (n int)

func (*MessageProof) String

func (m *MessageProof) String() string

func (*MessageProof) Unmarshal

func (m *MessageProof) Unmarshal(dAtA []byte) error

func (*MessageProof) XXX_DiscardUnknown

func (m *MessageProof) XXX_DiscardUnknown()

func (*MessageProof) XXX_Marshal

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

func (*MessageProof) XXX_Merge

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

func (*MessageProof) XXX_Size

func (m *MessageProof) XXX_Size() int

func (*MessageProof) XXX_Unmarshal

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

type Prefix

type Prefix struct {
	Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty" yaml:"value"`
}

func NewPrefix

func NewPrefix(value []byte) Prefix

NewPrefix constructs new Prefix instance

func (Prefix) Bytes

func (fp Prefix) Bytes() []byte

Bytes returns the key prefix bytes

func (*Prefix) Descriptor

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

func (Prefix) Empty

func (fp Prefix) Empty() bool

Empty returns true if the prefix is empty

func (*Prefix) Marshal

func (m *Prefix) Marshal() (dAtA []byte, err error)

func (*Prefix) MarshalTo

func (m *Prefix) MarshalTo(dAtA []byte) (int, error)

func (*Prefix) MarshalToSizedBuffer

func (m *Prefix) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Prefix) ProtoMessage

func (*Prefix) ProtoMessage()

func (*Prefix) Reset

func (m *Prefix) Reset()

func (*Prefix) Size

func (m *Prefix) Size() (n int)

func (*Prefix) String

func (m *Prefix) String() string

func (*Prefix) Unmarshal

func (m *Prefix) Unmarshal(dAtA []byte) error

func (*Prefix) XXX_DiscardUnknown

func (m *Prefix) XXX_DiscardUnknown()

func (*Prefix) XXX_Marshal

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

func (*Prefix) XXX_Merge

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

func (*Prefix) XXX_Size

func (m *Prefix) XXX_Size() int

func (*Prefix) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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