client

package
v1.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client implements protocol client.

func New

func New(protocolVersions []protocol.Version, opts ...Option) (*Client, error)

New creates new protocol client.

func (*Client) Current

func (c *Client) Current() (protocol.Version, error)

Current returns the latest version of protocol.

func (*Client) Get

func (c *Client) Get(genesisTime uint64) (protocol.Version, error)

Get gets protocol version based on blockchain(transaction) time.

type Option

type Option func(opts *Client)

Option is an option for client.

func WithCurrentProtocolVersion

func WithCurrentProtocolVersion(version string) Option

WithCurrentProtocolVersion sets optional current protocol version (defaults to last registered protocol).

Jump to

Keyboard shortcuts

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