Versions in this module Expand all Collapse all v0 v0.1.0 Mar 18, 2022 Changes in this version + var BlockID_ServiceDesc = grpc.ServiceDesc + var ChainDiscriminator_ServiceDesc = grpc.ServiceDesc + var File_sf_blockmeta_v1_blockmeta_proto protoreflect.FileDescriptor + var Forks_ServiceDesc = grpc.ServiceDesc + var TimeToID_ServiceDesc = grpc.ServiceDesc + func RegisterBlockIDServer(s grpc.ServiceRegistrar, srv BlockIDServer) + func RegisterChainDiscriminatorServer(s grpc.ServiceRegistrar, srv ChainDiscriminatorServer) + func RegisterForksServer(s grpc.ServiceRegistrar, srv ForksServer) + func RegisterTimeToIDServer(s grpc.ServiceRegistrar, srv TimeToIDServer) + func StartBlockResolver(cli BlockIDClient) func(ctx context.Context, targetBlockNum uint64) (uint64, string, error) + func Timestamp(ts *timestamppb.Timestamp) time.Time + func TimestampProto(t time.Time) *timestamppb.Timestamp + type BlockIDClient interface + LIBID func(ctx context.Context, in *LIBRequest, opts ...grpc.CallOption) (*BlockIDResponse, error) + NumToID func(ctx context.Context, in *NumToIDRequest, opts ...grpc.CallOption) (*BlockIDResponse, error) + func NewBlockIDClient(cc grpc.ClientConnInterface) BlockIDClient + type BlockIDResponse struct + BlockTimeMilli int64 + Id string + Irreversible bool + func (*BlockIDResponse) Descriptor() ([]byte, []int) + func (*BlockIDResponse) ProtoMessage() + func (x *BlockIDResponse) GetBlockTimeMilli() int64 + func (x *BlockIDResponse) GetId() string + func (x *BlockIDResponse) GetIrreversible() bool + func (x *BlockIDResponse) ProtoReflect() protoreflect.Message + func (x *BlockIDResponse) Reset() + func (x *BlockIDResponse) String() string + type BlockIDServer interface + LIBID func(context.Context, *LIBRequest) (*BlockIDResponse, error) + NumToID func(context.Context, *NumToIDRequest) (*BlockIDResponse, error) + type BlockRef struct + BlockID string + BlockNum uint64 + func (*BlockRef) Descriptor() ([]byte, []int) + func (*BlockRef) ProtoMessage() + func (x *BlockRef) GetBlockID() string + func (x *BlockRef) GetBlockNum() uint64 + func (x *BlockRef) ProtoReflect() protoreflect.Message + func (x *BlockRef) Reset() + func (x *BlockRef) String() string + type BlockRefs struct + BlockRefs []*BlockRef + func (*BlockRefs) Descriptor() ([]byte, []int) + func (*BlockRefs) ProtoMessage() + func (x *BlockRefs) GetBlockRefs() []*BlockRef + func (x *BlockRefs) ProtoReflect() protoreflect.Message + func (x *BlockRefs) Reset() + func (x *BlockRefs) String() string + type BlockResponse struct + Id string + Irreversible bool + Time *timestamppb.Timestamp + func (*BlockResponse) Descriptor() ([]byte, []int) + func (*BlockResponse) ProtoMessage() + func (x *BlockResponse) GetId() string + func (x *BlockResponse) GetIrreversible() bool + func (x *BlockResponse) GetTime() *timestamppb.Timestamp + func (x *BlockResponse) ProtoReflect() protoreflect.Message + func (x *BlockResponse) Reset() + func (x *BlockResponse) String() string + type ChainDiscriminatorClient interface + GetBlockInLongestChain func(ctx context.Context, in *GetBlockInLongestChainRequest, ...) (*GetBlockInLongestChainResponse, error) + InLongestChain func(ctx context.Context, in *InLongestChainRequest, opts ...grpc.CallOption) (*InLongestChainResponse, error) + func NewChainDiscriminatorClient(cc grpc.ClientConnInterface) ChainDiscriminatorClient + type ChainDiscriminatorServer interface + GetBlockInLongestChain func(context.Context, *GetBlockInLongestChainRequest) (*GetBlockInLongestChainResponse, error) + InLongestChain func(context.Context, *InLongestChainRequest) (*InLongestChainResponse, error) + type Client struct + func NewClient(conn *grpc.ClientConn) *Client + func (b *Client) BlockAfter(ctx context.Context, t time.Time, inclusive bool) (*BlockResponse, error) + func (b *Client) BlockAt(ctx context.Context, t time.Time) (*BlockResponse, error) + func (b *Client) BlockBefore(ctx context.Context, t time.Time, inclusive bool) (*BlockResponse, error) + func (b *Client) BlockNumToID(ctx context.Context, blockNum uint64) (*BlockIDResponse, error) + func (b *Client) ChainDiscriminatorClient() ChainDiscriminatorClient + func (b *Client) LIBID(ctx context.Context) (*BlockIDResponse, error) + type ForkResolveRequest struct + Block *BlockRef + func (*ForkResolveRequest) Descriptor() ([]byte, []int) + func (*ForkResolveRequest) ProtoMessage() + func (x *ForkResolveRequest) GetBlock() *BlockRef + func (x *ForkResolveRequest) ProtoReflect() protoreflect.Message + func (x *ForkResolveRequest) Reset() + func (x *ForkResolveRequest) String() string + type ForkResolveResponse struct + ForkedBlockRefs []*BlockRef + func (*ForkResolveResponse) Descriptor() ([]byte, []int) + func (*ForkResolveResponse) ProtoMessage() + func (x *ForkResolveResponse) GetForkedBlockRefs() []*BlockRef + func (x *ForkResolveResponse) ProtoReflect() protoreflect.Message + func (x *ForkResolveResponse) Reset() + func (x *ForkResolveResponse) String() string + type ForksClient interface + Resolve func(ctx context.Context, in *ForkResolveRequest, opts ...grpc.CallOption) (*ForkResolveResponse, error) + func NewForksClient(cc grpc.ClientConnInterface) ForksClient + type ForksServer interface + Resolve func(context.Context, *ForkResolveRequest) (*ForkResolveResponse, error) + type GetBlockInLongestChainRequest struct + BlockNum uint64 + func (*GetBlockInLongestChainRequest) Descriptor() ([]byte, []int) + func (*GetBlockInLongestChainRequest) ProtoMessage() + func (x *GetBlockInLongestChainRequest) GetBlockNum() uint64 + func (x *GetBlockInLongestChainRequest) ProtoReflect() protoreflect.Message + func (x *GetBlockInLongestChainRequest) Reset() + func (x *GetBlockInLongestChainRequest) String() string + type GetBlockInLongestChainResponse struct + BlockId string + BlockNum uint64 + Irreversible bool + func (*GetBlockInLongestChainResponse) Descriptor() ([]byte, []int) + func (*GetBlockInLongestChainResponse) ProtoMessage() + func (x *GetBlockInLongestChainResponse) GetBlockId() string + func (x *GetBlockInLongestChainResponse) GetBlockNum() uint64 + func (x *GetBlockInLongestChainResponse) GetIrreversible() bool + func (x *GetBlockInLongestChainResponse) ProtoReflect() protoreflect.Message + func (x *GetBlockInLongestChainResponse) Reset() + func (x *GetBlockInLongestChainResponse) String() string + type InLongestChainRequest struct + BlockID string + func (*InLongestChainRequest) Descriptor() ([]byte, []int) + func (*InLongestChainRequest) ProtoMessage() + func (x *InLongestChainRequest) GetBlockID() string + func (x *InLongestChainRequest) ProtoReflect() protoreflect.Message + func (x *InLongestChainRequest) Reset() + func (x *InLongestChainRequest) String() string + type InLongestChainResponse struct + InLongestChain bool + Irreversible bool + func (*InLongestChainResponse) Descriptor() ([]byte, []int) + func (*InLongestChainResponse) ProtoMessage() + func (x *InLongestChainResponse) GetInLongestChain() bool + func (x *InLongestChainResponse) GetIrreversible() bool + func (x *InLongestChainResponse) ProtoReflect() protoreflect.Message + func (x *InLongestChainResponse) Reset() + func (x *InLongestChainResponse) String() string + type LIBRequest struct + func (*LIBRequest) Descriptor() ([]byte, []int) + func (*LIBRequest) ProtoMessage() + func (x *LIBRequest) ProtoReflect() protoreflect.Message + func (x *LIBRequest) Reset() + func (x *LIBRequest) String() string + type NumToIDRequest struct + BlockNum uint64 + func (*NumToIDRequest) Descriptor() ([]byte, []int) + func (*NumToIDRequest) ProtoMessage() + func (x *NumToIDRequest) GetBlockNum() uint64 + func (x *NumToIDRequest) ProtoReflect() protoreflect.Message + func (x *NumToIDRequest) Reset() + func (x *NumToIDRequest) String() string + type RelativeTimeRequest struct + Inclusive bool + Time *timestamppb.Timestamp + func (*RelativeTimeRequest) Descriptor() ([]byte, []int) + func (*RelativeTimeRequest) ProtoMessage() + func (x *RelativeTimeRequest) GetInclusive() bool + func (x *RelativeTimeRequest) GetTime() *timestamppb.Timestamp + func (x *RelativeTimeRequest) ProtoReflect() protoreflect.Message + func (x *RelativeTimeRequest) Reset() + func (x *RelativeTimeRequest) String() string + type TimeRequest struct + Time *timestamppb.Timestamp + func (*TimeRequest) Descriptor() ([]byte, []int) + func (*TimeRequest) ProtoMessage() + func (x *TimeRequest) GetTime() *timestamppb.Timestamp + func (x *TimeRequest) ProtoReflect() protoreflect.Message + func (x *TimeRequest) Reset() + func (x *TimeRequest) String() string + type TimeToIDClient interface + After func(ctx context.Context, in *RelativeTimeRequest, opts ...grpc.CallOption) (*BlockResponse, error) + At func(ctx context.Context, in *TimeRequest, opts ...grpc.CallOption) (*BlockResponse, error) + Before func(ctx context.Context, in *RelativeTimeRequest, opts ...grpc.CallOption) (*BlockResponse, error) + func NewTimeToIDClient(cc grpc.ClientConnInterface) TimeToIDClient + type TimeToIDServer interface + After func(context.Context, *RelativeTimeRequest) (*BlockResponse, error) + At func(context.Context, *TimeRequest) (*BlockResponse, error) + Before func(context.Context, *RelativeTimeRequest) (*BlockResponse, error) + type UnimplementedBlockIDServer struct + func (UnimplementedBlockIDServer) LIBID(context.Context, *LIBRequest) (*BlockIDResponse, error) + func (UnimplementedBlockIDServer) NumToID(context.Context, *NumToIDRequest) (*BlockIDResponse, error) + type UnimplementedChainDiscriminatorServer struct + func (UnimplementedChainDiscriminatorServer) GetBlockInLongestChain(context.Context, *GetBlockInLongestChainRequest) (*GetBlockInLongestChainResponse, error) + func (UnimplementedChainDiscriminatorServer) InLongestChain(context.Context, *InLongestChainRequest) (*InLongestChainResponse, error) + type UnimplementedForksServer struct + func (UnimplementedForksServer) Resolve(context.Context, *ForkResolveRequest) (*ForkResolveResponse, error) + type UnimplementedTimeToIDServer struct + func (UnimplementedTimeToIDServer) After(context.Context, *RelativeTimeRequest) (*BlockResponse, error) + func (UnimplementedTimeToIDServer) At(context.Context, *TimeRequest) (*BlockResponse, error) + func (UnimplementedTimeToIDServer) Before(context.Context, *RelativeTimeRequest) (*BlockResponse, error) + type UnsafeBlockIDServer interface + type UnsafeChainDiscriminatorServer interface + type UnsafeForksServer interface + type UnsafeTimeToIDServer interface