solomachine

package
v7.0.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: MIT Imports: 26 Imported by: 0

Documentation

Overview

Package solomachine implements a concrete ClientState, ConsensusState, Header and Misbehaviour types for the Solo Machine light client. This implementation is based off the ICS 06 specification (https://github.com/cosmos/ibc/tree/master/spec/client/ics-006-solo-machine-client)

Index

Constants

View Source
const (
	ModuleName = "06-solomachine"
)
View Source
const SentinelHeaderPath = "solomachine:header"

SentinelHeaderPath defines a placeholder path value used for headers in solomachine client updates

Variables

View Source
var (
	ErrInvalidHeader               = errorsmod.Register(ModuleName, 2, "invalid header")
	ErrInvalidSequence             = errorsmod.Register(ModuleName, 3, "invalid sequence")
	ErrInvalidSignatureAndData     = errorsmod.Register(ModuleName, 4, "invalid signature and data")
	ErrSignatureVerificationFailed = errorsmod.Register(ModuleName, 5, "signature verification failed")
	ErrInvalidProof                = errorsmod.Register(ModuleName, 6, "invalid solo machine proof")
)
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")
)

Functions

func RegisterInterfaces

func RegisterInterfaces(registry codectypes.InterfaceRegistry)

RegisterInterfaces register the ibc channel submodule interfaces to protobuf Any.

func UnmarshalSignatureData

func UnmarshalSignatureData(cdc codec.BinaryCodec, 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 AppModuleBasic

type AppModuleBasic struct{}

AppModuleBasic defines the basic application module used by the solo machine light client. Only the RegisterInterfaces function needs to be implemented. All other function perform a no-op.

func (AppModuleBasic) DefaultGenesis

func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage

DefaultGenesis performs a no-op. Genesis is not supported for solo machine.

func (AppModuleBasic) GetQueryCmd

func (AppModuleBasic) GetQueryCmd() *cobra.Command

GetQueryCmd performs a no-op. Please see the 02-client cli commands.

func (AppModuleBasic) GetTxCmd

func (AppModuleBasic) GetTxCmd() *cobra.Command

GetTxCmd performs a no-op. Please see the 02-client cli commands.

func (AppModuleBasic) Name

func (AppModuleBasic) Name() string

Name returns the solo machine module name.

func (AppModuleBasic) RegisterGRPCGatewayRoutes

func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux)

RegisterGRPCGatewayRoutes performs a no-op.

func (AppModuleBasic) RegisterInterfaces

func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry)

RegisterInterfaces registers module concrete types into protobuf Any. This allows core IBC to unmarshal solo machine types.

func (AppModuleBasic) RegisterLegacyAminoCodec

func (AppModuleBasic) RegisterLegacyAminoCodec(*codec.LegacyAmino)

RegisterLegacyAminoCodec performs a no-op. The solo machine client does not support amino.

func (AppModuleBasic) ValidateGenesis

func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error

ValidateGenesis performs a no-op. Genesis is not supported for solo machine.

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
	IsFrozen       bool            `protobuf:"varint,2,opt,name=is_frozen,json=isFrozen,proto3" json:"is_frozen,omitempty" yaml:"is_frozen"`
	ConsensusState *ConsensusState `` /* 126-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) *ClientState

NewClientState creates a new ClientState instance.

func (ClientState) CheckForMisbehaviour

func (cs ClientState) CheckForMisbehaviour(_ sdk.Context, _ codec.BinaryCodec, _ sdk.KVStore, clientMsg exported.ClientMessage) bool

CheckForMisbehaviour returns true for type Misbehaviour (passed VerifyClientMessage check), otherwise returns false

func (ClientState) CheckSubstituteAndUpdateState

func (cs ClientState) CheckSubstituteAndUpdateState(
	ctx sdk.Context, cdc codec.BinaryCodec, subjectClientStore,
	_ sdk.KVStore, substituteClient exported.ClientState,
) error

CheckSubstituteAndUpdateState verifies that the subject is allowed to be updated by a governance proposal and that the substitute client is a solo machine. It will update the consensus state to the substitute's consensus state and the sequence to the substitute's current sequence. An error is returned if the client has been disallowed to be updated by a governance proposal, the substitute is not a solo machine, 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) 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) GetTimestampAtHeight

func (cs ClientState) GetTimestampAtHeight(
	_ sdk.Context,
	clientStore sdk.KVStore,
	cdc codec.BinaryCodec,
	height exported.Height,
) (uint64, error)

GetTimestampAtHeight returns the timestamp in nanoseconds of the consensus state at the given height.

func (ClientState) Initialize

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

Initialize checks that the initial consensus state is equal to the latest consensus state of the initial client and sets the client state in the provided client store.

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

Status returns the status of the solo machine client. The client may be: - Active: if frozen sequence is 0 - Frozen: otherwise solo machine is frozen

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

func (cs ClientState) UpdateState(ctx sdk.Context, cdc codec.BinaryCodec, clientStore sdk.KVStore, clientMsg exported.ClientMessage) []exported.Height

UpdateState updates the consensus state to the new public key and an incremented sequence. A list containing the updated consensus height is returned.

func (ClientState) UpdateStateOnMisbehaviour

func (cs ClientState) UpdateStateOnMisbehaviour(ctx sdk.Context, cdc codec.BinaryCodec, clientStore sdk.KVStore, _ exported.ClientMessage)

UpdateStateOnMisbehaviour updates state upon misbehaviour. This method should only be called on misbehaviour as it does not perform any misbehaviour checks.

func (ClientState) Validate

func (cs ClientState) Validate() error

Validate performs basic validation of the client state fields.

func (ClientState) VerifyClientMessage

func (cs ClientState) VerifyClientMessage(ctx sdk.Context, cdc codec.BinaryCodec, clientStore sdk.KVStore, clientMsg exported.ClientMessage) error

VerifyClientMessage introspects the provided ClientMessage and checks its validity A Solomachine Header is considered valid if the currently registered public key has signed over the new public key with the correct sequence A Solomachine Misbehaviour is considered valid if duplicate signatures of the current public key are found on two different messages at a given sequence

func (*ClientState) VerifyMembership

func (cs *ClientState) VerifyMembership(
	ctx sdk.Context,
	clientStore sdk.KVStore,
	cdc codec.BinaryCodec,
	_ exported.Height,
	delayTimePeriod uint64,
	delayBlockPeriod uint64,
	proof []byte,
	path exported.Path,
	value []byte,
) error

VerifyMembership is a generic proof verification method which verifies a proof of the existence of a value at a given CommitmentPath at the latest sequence. The caller is expected to construct the full CommitmentPath from a CommitmentPrefix and a standardized path (as defined in ICS 24).

func (*ClientState) VerifyNonMembership

func (cs *ClientState) VerifyNonMembership(
	ctx sdk.Context,
	clientStore sdk.KVStore,
	cdc codec.BinaryCodec,
	_ exported.Height,
	delayTimePeriod uint64,
	delayBlockPeriod uint64,
	proof []byte,
	path exported.Path,
) error

VerifyNonMembership is a generic proof verification method which verifies the absence of a given CommitmentPath at the latest sequence. The caller is expected to construct the full CommitmentPath from a CommitmentPrefix and a standardized path (as defined in ICS 24).

func (ClientState) VerifyUpgradeAndUpdateState

func (cs ClientState) VerifyUpgradeAndUpdateState(
	_ sdk.Context, _ codec.BinaryCodec, _ sdk.KVStore,
	_ exported.ClientState, _ exported.ConsensusState, _, _ []byte,
) error

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 is not implemented for solo machine

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

type Data interface{}

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

type Header struct {
	Timestamp      uint64     `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Signature      []byte     `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
	NewPublicKey   *types.Any `protobuf:"bytes,3,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) 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 timestamp, 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 {
	Sequence     uint64            `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"`
	SignatureOne *SignatureAndData `protobuf:"bytes,2,opt,name=signature_one,json=signatureOne,proto3" json:"signature_one,omitempty" yaml:"signature_one"`
	SignatureTwo *SignatureAndData `protobuf:"bytes,3,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) 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 Misbehaviour interface.

func (*Misbehaviour) Unmarshal

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

func (Misbehaviour) ValidateBasic

func (misbehaviour Misbehaviour) ValidateBasic() error

ValidateBasic implements Misbehaviour 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 SignBytes

type SignBytes struct {
	// the sequence number
	Sequence uint64 `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"`
	// the proof timestamp
	Timestamp uint64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// the public key diversifier
	Diversifier string `protobuf:"bytes,3,opt,name=diversifier,proto3" json:"diversifier,omitempty"`
	// the standardised path bytes
	Path []byte `protobuf:"bytes,4,opt,name=path,proto3" json:"path,omitempty"`
	// the marshaled data bytes
	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"`
	Path      []byte `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
	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