types

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SubModuleName = "solo machine"
)

Variables

View Source
var (
	ErrInvalidHeader               = sdkerrors.Register(SubModuleName, 2, "invalid header")
	ErrInvalidSequence             = sdkerrors.Register(SubModuleName, 3, "invalid sequence")
	ErrInvalidSignatureAndData     = sdkerrors.Register(SubModuleName, 4, "invalid signature and data")
	ErrSignatureVerificationFailed = sdkerrors.Register(SubModuleName, 5, "signature verification failed")
	ErrInvalidProof                = sdkerrors.Register(SubModuleName, 6, "invalid solo machine proof")
	ErrInvalidDataType             = sdkerrors.Register(SubModuleName, 7, "invalid data type")
)
View Source
var (
	ErrInvalidLengthSolomachine        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowSolomachine          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupSolomachine = fmt.Errorf("proto: unexpected end of group")
)
View Source
var DataType_name = map[int32]string{
	0: "DATA_TYPE_UNINITIALIZED_UNSPECIFIED",
	1: "DATA_TYPE_CLIENT_STATE",
	2: "DATA_TYPE_CONSENSUS_STATE",
	3: "DATA_TYPE_CONNECTION_STATE",
	4: "DATA_TYPE_CHANNEL_STATE",
	5: "DATA_TYPE_PACKET_COMMITMENT",
	6: "DATA_TYPE_PACKET_ACKNOWLEDGEMENT",
	7: "DATA_TYPE_PACKET_RECEIPT_ABSENCE",
	8: "DATA_TYPE_NEXT_SEQUENCE_RECV",
	9: "DATA_TYPE_HEADER",
}
View Source
var DataType_value = map[string]int32{
	"DATA_TYPE_UNINITIALIZED_UNSPECIFIED": 0,
	"DATA_TYPE_CLIENT_STATE":              1,
	"DATA_TYPE_CONSENSUS_STATE":           2,
	"DATA_TYPE_CONNECTION_STATE":          3,
	"DATA_TYPE_CHANNEL_STATE":             4,
	"DATA_TYPE_PACKET_COMMITMENT":         5,
	"DATA_TYPE_PACKET_ACKNOWLEDGEMENT":    6,
	"DATA_TYPE_PACKET_RECEIPT_ABSENCE":    7,
	"DATA_TYPE_NEXT_SEQUENCE_RECV":        8,
	"DATA_TYPE_HEADER":                    9,
}

Functions

func ChannelStateDataBytes

func ChannelStateDataBytes(
	cdc codec.BinaryMarshaler,
	path commitmenttypes.MerklePath,
	channelEnd exported.ChannelI,
) ([]byte, error)

ChannelStateDataBytes returns the channel state data bytes used in constructing SignBytes.

func ChannelStateSignBytes

func ChannelStateSignBytes(
	cdc codec.BinaryMarshaler,
	sequence, timestamp uint64,
	diversifier string,
	path commitmenttypes.MerklePath,
	channelEnd exported.ChannelI,
) ([]byte, error)

ChannelStateSignBytes returns the sign bytes for verification of the channel state.

func ClientStateDataBytes

func ClientStateDataBytes(
	cdc codec.BinaryMarshaler,
	path commitmenttypes.MerklePath,
	clientState exported.ClientState,
) ([]byte, error)

ClientStateDataBytes returns the client state data bytes used in constructing SignBytes.

func ClientStateSignBytes

func ClientStateSignBytes(
	cdc codec.BinaryMarshaler,
	sequence, timestamp uint64,
	diversifier string,
	path commitmenttypes.MerklePath,
	clientState exported.ClientState,
) ([]byte, error)

ClientStateSignBytes returns the sign bytes for verification of the client state.

func ConnectionStateDataBytes

func ConnectionStateDataBytes(
	cdc codec.BinaryMarshaler,
	path commitmenttypes.MerklePath,
	connectionEnd exported.ConnectionI,
) ([]byte, error)

ConnectionStateDataBytes returns the connection state data bytes used in constructing SignBytes.

func ConnectionStateSignBytes

func ConnectionStateSignBytes(
	cdc codec.BinaryMarshaler,
	sequence, timestamp uint64,
	diversifier string,
	path commitmenttypes.MerklePath,
	connectionEnd exported.ConnectionI,
) ([]byte, error)

ConnectionStateSignBytes returns the sign bytes for verification of the connection state.

func ConsensusStateDataBytes

func ConsensusStateDataBytes(
	cdc codec.BinaryMarshaler,
	path commitmenttypes.MerklePath,
	consensusState exported.ConsensusState,
) ([]byte, error)

ConsensusStateDataBytes returns the consensus state data bytes used in constructing SignBytes.

func ConsensusStateSignBytes

func ConsensusStateSignBytes(
	cdc codec.BinaryMarshaler,
	sequence, timestamp uint64,
	diversifier string,
	path commitmenttypes.MerklePath,
	consensusState exported.ConsensusState,
) ([]byte, error)

ConsensusStateSignBytes returns the sign bytes for verification of the consensus state.

func HeaderSignBytes

func HeaderSignBytes(
	cdc codec.BinaryMarshaler,
	header *Header,
) ([]byte, error)

HeaderSignBytes returns the sign bytes for verification of misbehaviour.

func MisbehaviourSignBytes

func MisbehaviourSignBytes(
	cdc codec.BinaryMarshaler,
	sequence, timestamp uint64,
	diversifier string,
	dataType DataType,
	data []byte) ([]byte, error)

MisbehaviourSignBytes returns the sign bytes for verification of misbehaviour.

func NextSequenceRecvDataBytes

func NextSequenceRecvDataBytes(
	cdc codec.BinaryMarshaler,
	path commitmenttypes.MerklePath,
	nextSequenceRecv uint64,
) ([]byte, error)

NextSequenceRecvDataBytes returns the next sequence recv data bytes used in constructing SignBytes.

func NextSequenceRecvSignBytes

func NextSequenceRecvSignBytes(
	cdc codec.BinaryMarshaler,
	sequence, timestamp uint64,
	diversifier string,
	path commitmenttypes.MerklePath,
	nextSequenceRecv uint64,
) ([]byte, error)

NextSequenceRecvSignBytes returns the sign bytes for verification of the next sequence to be received.

func PacketAcknowledgementDataBytes

func PacketAcknowledgementDataBytes(
	cdc codec.BinaryMarshaler,
	path commitmenttypes.MerklePath,
	acknowledgement []byte,
) ([]byte, error)

PacketAcknowledgementDataBytes returns the packet acknowledgement data bytes used in constructing SignBytes.

func PacketAcknowledgementSignBytes

func PacketAcknowledgementSignBytes(
	cdc codec.BinaryMarshaler,
	sequence, timestamp uint64,
	diversifier string,
	path commitmenttypes.MerklePath,
	acknowledgement []byte,
) ([]byte, error)

PacketAcknowledgementSignBytes returns the sign bytes for verification of the acknowledgement.

func PacketCommitmentDataBytes

func PacketCommitmentDataBytes(
	cdc codec.BinaryMarshaler,
	path commitmenttypes.MerklePath,
	commitmentBytes []byte,
) ([]byte, error)

PacketCommitmentDataBytes returns the packet commitment data bytes used in constructing SignBytes.

func PacketCommitmentSignBytes

func PacketCommitmentSignBytes(
	cdc codec.BinaryMarshaler,
	sequence, timestamp uint64,
	diversifier string,
	path commitmenttypes.MerklePath,
	commitmentBytes []byte,
) ([]byte, error)

PacketCommitmentSignBytes returns the sign bytes for verification of the packet commitment.

func PacketReceiptAbsenceDataBytes

func PacketReceiptAbsenceDataBytes(
	cdc codec.BinaryMarshaler,
	path commitmenttypes.MerklePath,
) ([]byte, error)

PacketReceiptAbsenceDataBytes returns the packet receipt absence data bytes used in constructing SignBytes.

func PacketReceiptAbsenceSignBytes

func PacketReceiptAbsenceSignBytes(
	cdc codec.BinaryMarshaler,
	sequence, timestamp uint64,
	diversifier string,
	path commitmenttypes.MerklePath,
) ([]byte, error)

PacketReceiptAbsenceSignBytes returns the sign bytes for verification of the absence of an receipt.

func RegisterInterfaces

func RegisterInterfaces(registry codectypes.InterfaceRegistry)

RegisterInterfaces register the icp channel submodule interfaces to protobuf Any.

func UnmarshalSignatureData

func UnmarshalSignatureData(cdc codec.BinaryMarshaler, data []byte) (signing.SignatureData, error)

func VerifySignature

func VerifySignature(pubKey cryptotypes.PubKey, signBytes []byte, sigData signing.SignatureData) error

VerifySignature verifies if the the provided public key generated the signature over the given data. Single and Multi signature public keys are supported. The signature data type must correspond to the public key type. An error is returned if signature verification fails or an invalid SignatureData type is provided.

Types

type ChannelStateData

type ChannelStateData struct {
	Path    []byte          `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	Channel *types2.Channel `protobuf:"bytes,2,opt,name=channel,proto3" json:"channel,omitempty"`
}

ChannelStateData returns the SignBytes data for channel state verification.

func (*ChannelStateData) Descriptor

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

func (*ChannelStateData) Marshal

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

func (*ChannelStateData) MarshalTo

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

func (*ChannelStateData) MarshalToSizedBuffer

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

func (*ChannelStateData) ProtoMessage

func (*ChannelStateData) ProtoMessage()

func (*ChannelStateData) Reset

func (m *ChannelStateData) Reset()

func (*ChannelStateData) Size

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

func (*ChannelStateData) String

func (m *ChannelStateData) String() string

func (*ChannelStateData) Unmarshal

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

func (*ChannelStateData) XXX_DiscardUnknown

func (m *ChannelStateData) XXX_DiscardUnknown()

func (*ChannelStateData) XXX_Marshal

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

func (*ChannelStateData) XXX_Merge

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

func (*ChannelStateData) XXX_Size

func (m *ChannelStateData) XXX_Size() int

func (*ChannelStateData) XXX_Unmarshal

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

type ClientState

type ClientState struct {
	// latest sequence of the client state
	Sequence uint64 `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"`
	// frozen sequence of the solo machine
	FrozenSequence uint64          `` /* 127-byte string literal not displayed */
	ConsensusState *ConsensusState `` /* 126-byte string literal not displayed */
	// when set to true, will allow governance to update a solo machine client.
	// The client will be unfrozen if it is frozen.
	AllowUpdateAfterProposal bool `` /* 173-byte string literal not displayed */
}

ClientState defines a solo machine client that tracks the current consensus state and if the client is frozen.

func NewClientState

func NewClientState(latestSequence uint64, consensusState *ConsensusState, allowUpdateAfterProposal bool) *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)

CheckMisbehaviourAndUpdateState determines whether or not the currently registered public key signed over two different messages with the same sequence. If this is true the client state is updated to a frozen status. NOTE: Misbehaviour is not tracked for previous public keys, a solo machine may update to a new public key before the misbehaviour is processed. Therefore, misbehaviour is data order processing dependent.

func (ClientState) CheckProposedHeaderAndUpdateState

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

CheckProposedHeaderAndUpdateState updates the consensus state to the header's sequence and public key. An error is returned if the client has been disallowed to be updated by a governance proposal, the header cannot be casted to a solo machine header, or the current public key equals the new public key.

func (ClientState) ClientType

func (cs ClientState) ClientType() string

ClientType is Solo Machine.

func (*ClientState) Descriptor

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

func (ClientState) ExportMetadata

func (cs ClientState) ExportMetadata(_ sdk.KVStore) []exported.GenesisMetadata

ExportMetadata is a no-op since solomachine does not store any metadata in client store

func (ClientState) GetFrozenHeight

func (cs ClientState) GetFrozenHeight() exported.Height

GetFrozenHeight returns the frozen sequence of the client. Return exported.Height to satisfy interface Revision number is always 0 for a solo-machine

func (ClientState) GetLatestHeight

func (cs ClientState) GetLatestHeight() exported.Height

GetLatestHeight returns the latest sequence number. Return exported.Height to satisfy ClientState interface Revision number is always 0 for a solo-machine.

func (ClientState) GetProofSpecs

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

GetProofSpecs returns nil proof specs since client state verification uses signatures.

func (ClientState) Initialize

func (cs ClientState) Initialize(_ sdk.Context, _ codec.BinaryMarshaler, _ sdk.KVStore, consState exported.ConsensusState) error

Initialize will check that initial consensus state is equal to the latest consensus state of the initial client.

func (ClientState) IsFrozen

func (cs ClientState) IsFrozen() bool

IsFrozen returns true if the client is frozen.

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

func (cs ClientState) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error

UnpackInterfaces implements the UnpackInterfaceMessages.UnpackInterfaces method

func (ClientState) Validate

func (cs ClientState) Validate() error

Validate performs 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 running chain stored on the solo 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 solo 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 on the target machine.

func (ClientState) VerifyNextSequenceRecv

func (cs ClientState) VerifyNextSequenceRecv(
	store sdk.KVStore,
	cdc codec.BinaryMarshaler,
	height exported.Height,
	_ uint64,
	_ uint64,
	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,
	_ uint64,
	_ uint64,
	prefix exported.Prefix,
	proof []byte,
	portID,
	channelID string,
	packetSequence 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,
	_ uint64,
	_ uint64,
	prefix exported.Prefix,
	proof []byte,
	portID,
	channelID string,
	packetSequence 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,
	_ uint64,
	_ uint64,
	prefix exported.Prefix,
	proof []byte,
	portID,
	channelID string,
	packetSequence uint64,
) error

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

func (ClientState) VerifyUpgradeAndUpdateState

VerifyUpgradeAndUpdateState 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 ClientStateData

type ClientStateData struct {
	Path        []byte     `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	ClientState *types.Any `protobuf:"bytes,2,opt,name=client_state,json=clientState,proto3" json:"client_state,omitempty" yaml:"client_state"`
}

ClientStateData returns the SignBytes data for client state verification.

func (*ClientStateData) Descriptor

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

func (*ClientStateData) Marshal

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

func (*ClientStateData) MarshalTo

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

func (*ClientStateData) MarshalToSizedBuffer

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

func (*ClientStateData) ProtoMessage

func (*ClientStateData) ProtoMessage()

func (*ClientStateData) Reset

func (m *ClientStateData) Reset()

func (*ClientStateData) Size

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

func (*ClientStateData) String

func (m *ClientStateData) String() string

func (*ClientStateData) Unmarshal

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

func (ClientStateData) UnpackInterfaces

func (csd ClientStateData) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error

UnpackInterfaces implements the UnpackInterfaceMessages.UnpackInterfaces method

func (*ClientStateData) XXX_DiscardUnknown

func (m *ClientStateData) XXX_DiscardUnknown()

func (*ClientStateData) XXX_Marshal

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

func (*ClientStateData) XXX_Merge

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

func (*ClientStateData) XXX_Size

func (m *ClientStateData) XXX_Size() int

func (*ClientStateData) XXX_Unmarshal

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

type ConnectionStateData

type ConnectionStateData struct {
	Path       []byte                `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	Connection *types1.ConnectionEnd `protobuf:"bytes,2,opt,name=connection,proto3" json:"connection,omitempty"`
}

ConnectionStateData returns the SignBytes data for connection state verification.

func (*ConnectionStateData) Descriptor

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

func (*ConnectionStateData) Marshal

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

func (*ConnectionStateData) MarshalTo

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

func (*ConnectionStateData) MarshalToSizedBuffer

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

func (*ConnectionStateData) ProtoMessage

func (*ConnectionStateData) ProtoMessage()

func (*ConnectionStateData) Reset

func (m *ConnectionStateData) Reset()

func (*ConnectionStateData) Size

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

func (*ConnectionStateData) String

func (m *ConnectionStateData) String() string

func (*ConnectionStateData) Unmarshal

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

func (*ConnectionStateData) XXX_DiscardUnknown

func (m *ConnectionStateData) XXX_DiscardUnknown()

func (*ConnectionStateData) XXX_Marshal

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

func (*ConnectionStateData) XXX_Merge

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

func (*ConnectionStateData) XXX_Size

func (m *ConnectionStateData) XXX_Size() int

func (*ConnectionStateData) XXX_Unmarshal

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

type ConsensusState

type ConsensusState struct {
	// public key of the solo machine
	PublicKey *types.Any `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty" yaml:"public_key"`
	// diversifier allows the same public key to be re-used across different solo machine clients
	// (potentially on different chains) without being considered misbehaviour.
	Diversifier string `protobuf:"bytes,2,opt,name=diversifier,proto3" json:"diversifier,omitempty"`
	Timestamp   uint64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
}

ConsensusState defines a solo machine consensus state. The sequence of a consensus state is contained in the "height" key used in storing the consensus state.

func (ConsensusState) ClientType

func (ConsensusState) ClientType() string

ClientType returns Solo Machine type.

func (*ConsensusState) Descriptor

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

func (ConsensusState) GetPubKey

func (cs ConsensusState) GetPubKey() (cryptotypes.PubKey, error)

GetPubKey unmarshals the public key into a cryptotypes.PubKey type. An error is returned if the public key is nil or the cached value is not a PubKey.

func (ConsensusState) GetRoot

func (cs ConsensusState) GetRoot() exported.Root

GetRoot returns nil since solo machines do not have roots.

func (ConsensusState) GetTimestamp

func (cs ConsensusState) GetTimestamp() uint64

GetTimestamp returns zero.

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

func (cs ConsensusState) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error

UnpackInterfaces implements the UnpackInterfaceMessages.UnpackInterfaces method

func (ConsensusState) ValidateBasic

func (cs ConsensusState) ValidateBasic() error

ValidateBasic defines basic validation for the solo machine 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 ConsensusStateData

type ConsensusStateData struct {
	Path           []byte     `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	ConsensusState *types.Any `` /* 126-byte string literal not displayed */
}

ConsensusStateData returns the SignBytes data for consensus state verification.

func (*ConsensusStateData) Descriptor

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

func (*ConsensusStateData) Marshal

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

func (*ConsensusStateData) MarshalTo

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

func (*ConsensusStateData) MarshalToSizedBuffer

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

func (*ConsensusStateData) ProtoMessage

func (*ConsensusStateData) ProtoMessage()

func (*ConsensusStateData) Reset

func (m *ConsensusStateData) Reset()

func (*ConsensusStateData) Size

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

func (*ConsensusStateData) String

func (m *ConsensusStateData) String() string

func (*ConsensusStateData) Unmarshal

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

func (ConsensusStateData) UnpackInterfaces

func (csd ConsensusStateData) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error

UnpackInterfaces implements the UnpackInterfaceMessages.UnpackInterfaces method

func (*ConsensusStateData) XXX_DiscardUnknown

func (m *ConsensusStateData) XXX_DiscardUnknown()

func (*ConsensusStateData) XXX_Marshal

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

func (*ConsensusStateData) XXX_Merge

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

func (*ConsensusStateData) XXX_Size

func (m *ConsensusStateData) XXX_Size() int

func (*ConsensusStateData) XXX_Unmarshal

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

type Data

type Data interface{}

Data is an interface used for all the signature data bytes proto definitions.

func UnmarshalDataByType

func UnmarshalDataByType(cdc codec.BinaryMarshaler, dataType DataType, data []byte) (Data, error)

UnmarshalDataByType attempts to unmarshal the data to the specified type. An error is return if it fails.

type DataType

type DataType int32

DataType defines the type of solo machine proof being created. This is done to preserve uniqueness of different data sign byte encodings.

const (
	// Default State
	UNSPECIFIED DataType = 0
	// Data type for client state verification
	CLIENT DataType = 1
	// Data type for consensus state verification
	CONSENSUS DataType = 2
	// Data type for connection state verification
	CONNECTION DataType = 3
	// Data type for channel state verification
	CHANNEL DataType = 4
	// Data type for packet commitment verification
	PACKETCOMMITMENT DataType = 5
	// Data type for packet acknowledgement verification
	PACKETACKNOWLEDGEMENT DataType = 6
	// Data type for packet receipt absence verification
	PACKETRECEIPTABSENCE DataType = 7
	// Data type for next sequence recv verification
	NEXTSEQUENCERECV DataType = 8
	// Data type for header verification
	HEADER DataType = 9
)

func (DataType) EnumDescriptor

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

func (DataType) String

func (x DataType) String() string
type Header struct {
	// sequence to update solo machine public key at
	Sequence       uint64     `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"`
	Timestamp      uint64     `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Signature      []byte     `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"`
	NewPublicKey   *types.Any `protobuf:"bytes,4,opt,name=new_public_key,json=newPublicKey,proto3" json:"new_public_key,omitempty" yaml:"new_public_key"`
	NewDiversifier string     `` /* 126-byte string literal not displayed */
}

Header defines a solo machine consensus header

func (Header) ClientType

func (Header) ClientType() string

ClientType defines that the Header is a Solo Machine.

func (*Header) Descriptor

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

func (Header) GetHeight

func (h Header) GetHeight() exported.Height

GetHeight returns the current sequence number as the height. Return clientexported.Height to satisfy interface Revision number is always 0 for a solo-machine

func (Header) GetPubKey

func (h Header) GetPubKey() (cryptotypes.PubKey, error)

GetPubKey unmarshals the new public key into a cryptotypes.PubKey type. An error is returned if the new public key is nil or the cached value is not a PubKey.

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

func (h Header) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error

UnpackInterfaces implements the UnpackInterfaceMessages.UnpackInterfaces method

func (Header) ValidateBasic

func (h Header) ValidateBasic() error

ValidateBasic ensures that the sequence, signature and public key have all been initialized.

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 HeaderData

type HeaderData struct {
	// header public key
	NewPubKey *types.Any `protobuf:"bytes,1,opt,name=new_pub_key,json=newPubKey,proto3" json:"new_pub_key,omitempty" yaml:"new_pub_key"`
	// header diversifier
	NewDiversifier string `` /* 126-byte string literal not displayed */
}

HeaderData returns the SignBytes data for update verification.

func (*HeaderData) Descriptor

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

func (*HeaderData) Marshal

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

func (*HeaderData) MarshalTo

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

func (*HeaderData) MarshalToSizedBuffer

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

func (*HeaderData) ProtoMessage

func (*HeaderData) ProtoMessage()

func (*HeaderData) Reset

func (m *HeaderData) Reset()

func (*HeaderData) Size

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

func (*HeaderData) String

func (m *HeaderData) String() string

func (*HeaderData) Unmarshal

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

func (HeaderData) UnpackInterfaces

func (hd HeaderData) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error

UnpackInterfaces implements the UnpackInterfaceMessages.UnpackInterfaces method

func (*HeaderData) XXX_DiscardUnknown

func (m *HeaderData) XXX_DiscardUnknown()

func (*HeaderData) XXX_Marshal

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

func (*HeaderData) XXX_Merge

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

func (*HeaderData) XXX_Size

func (m *HeaderData) XXX_Size() int

func (*HeaderData) XXX_Unmarshal

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

type Misbehaviour

type Misbehaviour struct {
	ClientId     string            `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" yaml:"client_id"`
	Sequence     uint64            `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"`
	SignatureOne *SignatureAndData `protobuf:"bytes,3,opt,name=signature_one,json=signatureOne,proto3" json:"signature_one,omitempty" yaml:"signature_one"`
	SignatureTwo *SignatureAndData `protobuf:"bytes,4,opt,name=signature_two,json=signatureTwo,proto3" json:"signature_two,omitempty" yaml:"signature_two"`
}

Misbehaviour defines misbehaviour for a solo machine which consists of a sequence and two signatures over different messages at that sequence.

func (Misbehaviour) ClientType

func (misbehaviour Misbehaviour) ClientType() string

ClientType is a Solo Machine light client.

func (*Misbehaviour) Descriptor

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

func (Misbehaviour) GetClientID

func (misbehaviour Misbehaviour) GetClientID() string

GetClientID returns the ID of the client that committed a misbehaviour.

func (Misbehaviour) GetHeight

func (misbehaviour Misbehaviour) GetHeight() exported.Height

GetHeight returns the sequence at which misbehaviour occurred. Return exported.Height to satisfy interface Revision number is always 0 for a solo-machine

func (*Misbehaviour) Marshal

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

func (*Misbehaviour) MarshalTo

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

func (*Misbehaviour) MarshalToSizedBuffer

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

func (*Misbehaviour) ProtoMessage

func (*Misbehaviour) ProtoMessage()

func (*Misbehaviour) Reset

func (m *Misbehaviour) Reset()

func (*Misbehaviour) Size

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

func (*Misbehaviour) String

func (m *Misbehaviour) String() string

func (Misbehaviour) Type

func (misbehaviour Misbehaviour) Type() string

Type implements Evidence interface.

func (*Misbehaviour) Unmarshal

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

func (Misbehaviour) ValidateBasic

func (misbehaviour Misbehaviour) ValidateBasic() error

ValidateBasic implements Evidence interface.

func (*Misbehaviour) XXX_DiscardUnknown

func (m *Misbehaviour) XXX_DiscardUnknown()

func (*Misbehaviour) XXX_Marshal

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

func (*Misbehaviour) XXX_Merge

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

func (*Misbehaviour) XXX_Size

func (m *Misbehaviour) XXX_Size() int

func (*Misbehaviour) XXX_Unmarshal

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

type NextSequenceRecvData

type NextSequenceRecvData struct {
	Path        []byte `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	NextSeqRecv uint64 `protobuf:"varint,2,opt,name=next_seq_recv,json=nextSeqRecv,proto3" json:"next_seq_recv,omitempty" yaml:"next_seq_recv"`
}

NextSequenceRecvData returns the SignBytes data for verification of the next sequence to be received.

func (*NextSequenceRecvData) Descriptor

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

func (*NextSequenceRecvData) GetNextSeqRecv

func (m *NextSequenceRecvData) GetNextSeqRecv() uint64

func (*NextSequenceRecvData) GetPath

func (m *NextSequenceRecvData) GetPath() []byte

func (*NextSequenceRecvData) Marshal

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

func (*NextSequenceRecvData) MarshalTo

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

func (*NextSequenceRecvData) MarshalToSizedBuffer

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

func (*NextSequenceRecvData) ProtoMessage

func (*NextSequenceRecvData) ProtoMessage()

func (*NextSequenceRecvData) Reset

func (m *NextSequenceRecvData) Reset()

func (*NextSequenceRecvData) Size

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

func (*NextSequenceRecvData) String

func (m *NextSequenceRecvData) String() string

func (*NextSequenceRecvData) Unmarshal

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

func (*NextSequenceRecvData) XXX_DiscardUnknown

func (m *NextSequenceRecvData) XXX_DiscardUnknown()

func (*NextSequenceRecvData) XXX_Marshal

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

func (*NextSequenceRecvData) XXX_Merge

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

func (*NextSequenceRecvData) XXX_Size

func (m *NextSequenceRecvData) XXX_Size() int

func (*NextSequenceRecvData) XXX_Unmarshal

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

type PacketAcknowledgementData

type PacketAcknowledgementData struct {
	Path            []byte `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	Acknowledgement []byte `protobuf:"bytes,2,opt,name=acknowledgement,proto3" json:"acknowledgement,omitempty"`
}

PacketAcknowledgementData returns the SignBytes data for acknowledgement verification.

func (*PacketAcknowledgementData) Descriptor

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

func (*PacketAcknowledgementData) GetAcknowledgement

func (m *PacketAcknowledgementData) GetAcknowledgement() []byte

func (*PacketAcknowledgementData) GetPath

func (m *PacketAcknowledgementData) GetPath() []byte

func (*PacketAcknowledgementData) Marshal

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

func (*PacketAcknowledgementData) MarshalTo

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

func (*PacketAcknowledgementData) MarshalToSizedBuffer

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

func (*PacketAcknowledgementData) ProtoMessage

func (*PacketAcknowledgementData) ProtoMessage()

func (*PacketAcknowledgementData) Reset

func (m *PacketAcknowledgementData) Reset()

func (*PacketAcknowledgementData) Size

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

func (*PacketAcknowledgementData) String

func (m *PacketAcknowledgementData) String() string

func (*PacketAcknowledgementData) Unmarshal

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

func (*PacketAcknowledgementData) XXX_DiscardUnknown

func (m *PacketAcknowledgementData) XXX_DiscardUnknown()

func (*PacketAcknowledgementData) XXX_Marshal

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

func (*PacketAcknowledgementData) XXX_Merge

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

func (*PacketAcknowledgementData) XXX_Size

func (m *PacketAcknowledgementData) XXX_Size() int

func (*PacketAcknowledgementData) XXX_Unmarshal

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

type PacketCommitmentData

type PacketCommitmentData struct {
	Path       []byte `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	Commitment []byte `protobuf:"bytes,2,opt,name=commitment,proto3" json:"commitment,omitempty"`
}

PacketCommitmentData returns the SignBytes data for packet commitment verification.

func (*PacketCommitmentData) Descriptor

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

func (*PacketCommitmentData) GetCommitment

func (m *PacketCommitmentData) GetCommitment() []byte

func (*PacketCommitmentData) GetPath

func (m *PacketCommitmentData) GetPath() []byte

func (*PacketCommitmentData) Marshal

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

func (*PacketCommitmentData) MarshalTo

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

func (*PacketCommitmentData) MarshalToSizedBuffer

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

func (*PacketCommitmentData) ProtoMessage

func (*PacketCommitmentData) ProtoMessage()

func (*PacketCommitmentData) Reset

func (m *PacketCommitmentData) Reset()

func (*PacketCommitmentData) Size

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

func (*PacketCommitmentData) String

func (m *PacketCommitmentData) String() string

func (*PacketCommitmentData) Unmarshal

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

func (*PacketCommitmentData) XXX_DiscardUnknown

func (m *PacketCommitmentData) XXX_DiscardUnknown()

func (*PacketCommitmentData) XXX_Marshal

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

func (*PacketCommitmentData) XXX_Merge

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

func (*PacketCommitmentData) XXX_Size

func (m *PacketCommitmentData) XXX_Size() int

func (*PacketCommitmentData) XXX_Unmarshal

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

type PacketReceiptAbsenceData

type PacketReceiptAbsenceData struct {
	Path []byte `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
}

PacketReceiptAbsenceData returns the SignBytes data for packet receipt absence verification.

func (*PacketReceiptAbsenceData) Descriptor

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

func (*PacketReceiptAbsenceData) GetPath

func (m *PacketReceiptAbsenceData) GetPath() []byte

func (*PacketReceiptAbsenceData) Marshal

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

func (*PacketReceiptAbsenceData) MarshalTo

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

func (*PacketReceiptAbsenceData) MarshalToSizedBuffer

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

func (*PacketReceiptAbsenceData) ProtoMessage

func (*PacketReceiptAbsenceData) ProtoMessage()

func (*PacketReceiptAbsenceData) Reset

func (m *PacketReceiptAbsenceData) Reset()

func (*PacketReceiptAbsenceData) Size

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

func (*PacketReceiptAbsenceData) String

func (m *PacketReceiptAbsenceData) String() string

func (*PacketReceiptAbsenceData) Unmarshal

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

func (*PacketReceiptAbsenceData) XXX_DiscardUnknown

func (m *PacketReceiptAbsenceData) XXX_DiscardUnknown()

func (*PacketReceiptAbsenceData) XXX_Marshal

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

func (*PacketReceiptAbsenceData) XXX_Merge

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

func (*PacketReceiptAbsenceData) XXX_Size

func (m *PacketReceiptAbsenceData) XXX_Size() int

func (*PacketReceiptAbsenceData) XXX_Unmarshal

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

type SignBytes

type SignBytes struct {
	Sequence    uint64 `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"`
	Timestamp   uint64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Diversifier string `protobuf:"bytes,3,opt,name=diversifier,proto3" json:"diversifier,omitempty"`
	// type of the data used
	DataType DataType `` /* 149-byte string literal not displayed */
	// marshaled data
	Data []byte `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"`
}

SignBytes defines the signed bytes used for signature verification.

func (*SignBytes) Descriptor

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

func (*SignBytes) Marshal

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

func (*SignBytes) MarshalTo

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

func (*SignBytes) MarshalToSizedBuffer

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

func (*SignBytes) ProtoMessage

func (*SignBytes) ProtoMessage()

func (*SignBytes) Reset

func (m *SignBytes) Reset()

func (*SignBytes) Size

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

func (*SignBytes) String

func (m *SignBytes) String() string

func (*SignBytes) Unmarshal

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

func (*SignBytes) XXX_DiscardUnknown

func (m *SignBytes) XXX_DiscardUnknown()

func (*SignBytes) XXX_Marshal

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

func (*SignBytes) XXX_Merge

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

func (*SignBytes) XXX_Size

func (m *SignBytes) XXX_Size() int

func (*SignBytes) XXX_Unmarshal

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

type SignatureAndData

type SignatureAndData struct {
	Signature []byte   `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"`
	DataType  DataType `` /* 149-byte string literal not displayed */
	Data      []byte   `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	Timestamp uint64   `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
}

SignatureAndData contains a signature and the data signed over to create that signature.

func (*SignatureAndData) Descriptor

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

func (*SignatureAndData) Marshal

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

func (*SignatureAndData) MarshalTo

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

func (*SignatureAndData) MarshalToSizedBuffer

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

func (*SignatureAndData) ProtoMessage

func (*SignatureAndData) ProtoMessage()

func (*SignatureAndData) Reset

func (m *SignatureAndData) Reset()

func (*SignatureAndData) Size

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

func (*SignatureAndData) String

func (m *SignatureAndData) String() string

func (*SignatureAndData) Unmarshal

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

func (SignatureAndData) ValidateBasic

func (sd SignatureAndData) ValidateBasic() error

ValidateBasic ensures that the signature and data fields are non-empty.

func (*SignatureAndData) XXX_DiscardUnknown

func (m *SignatureAndData) XXX_DiscardUnknown()

func (*SignatureAndData) XXX_Marshal

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

func (*SignatureAndData) XXX_Merge

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

func (*SignatureAndData) XXX_Size

func (m *SignatureAndData) XXX_Size() int

func (*SignatureAndData) XXX_Unmarshal

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

type TimestampedSignatureData

type TimestampedSignatureData struct {
	SignatureData []byte `protobuf:"bytes,1,opt,name=signature_data,json=signatureData,proto3" json:"signature_data,omitempty" yaml:"signature_data"`
	Timestamp     uint64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
}

TimestampedSignatureData contains the signature data and the timestamp of the signature.

func (*TimestampedSignatureData) Descriptor

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

func (*TimestampedSignatureData) Marshal

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

func (*TimestampedSignatureData) MarshalTo

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

func (*TimestampedSignatureData) MarshalToSizedBuffer

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

func (*TimestampedSignatureData) ProtoMessage

func (*TimestampedSignatureData) ProtoMessage()

func (*TimestampedSignatureData) Reset

func (m *TimestampedSignatureData) Reset()

func (*TimestampedSignatureData) Size

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

func (*TimestampedSignatureData) String

func (m *TimestampedSignatureData) String() string

func (*TimestampedSignatureData) Unmarshal

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

func (*TimestampedSignatureData) XXX_DiscardUnknown

func (m *TimestampedSignatureData) XXX_DiscardUnknown()

func (*TimestampedSignatureData) XXX_Marshal

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

func (*TimestampedSignatureData) XXX_Merge

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

func (*TimestampedSignatureData) XXX_Size

func (m *TimestampedSignatureData) XXX_Size() int

func (*TimestampedSignatureData) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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