Documentation ¶
Index ¶
- Variables
- type Client
- func (c *Client) CurrentRound() *types.RoundConfirmationWrapper
- func (c *Client) GetLatest(parentCtx context.Context, did string) (*consensus.SignedChainTree, error)
- func (c *Client) GetTip(ctx context.Context, did string) (*gossip.Proof, error)
- func (c *Client) NewAddBlockRequest(ctx context.Context, tree *consensus.SignedChainTree, ...) (*services.AddBlockRequest, error)
- func (c *Client) PlayTransactions(ctx context.Context, tree *consensus.SignedChainTree, ...) (*gossip.Proof, error)
- func (c *Client) Send(ctx context.Context, abr *services.AddBlockRequest, timeout time.Duration) (*gossip.Proof, error)
- func (c *Client) SendWithoutWait(ctx context.Context, abr *services.AddBlockRequest) error
- func (c *Client) Start(ctx context.Context) error
- func (c *Client) SubscribeToAbr(ctx context.Context, abr *services.AddBlockRequest, ch chan *gossip.Proof) (subscription, error)
- func (c *Client) SubscribeToRounds(ctx context.Context, ch chan *types.RoundConfirmationWrapper) (subscription, error)
- func (c *Client) UnsubscribeFromAbr(s subscription)
- func (c *Client) UnsubscribeFromRounds(s subscription)
- func (c *Client) WaitForFirstRound(ctx context.Context, timeout time.Duration) error
- type ValidationNotification
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultRoundWaitTimeout = 5 * time.Second
View Source
var DefaultTimeout = 30 * time.Second
View Source
var ErrNoRound = errors.New("no current round found")
View Source
var ErrNotFound = hamt.ErrNotFound
View Source
var ErrTimeout = errors.New("error timeout")
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Group *types.NotaryGroup // contains filtered or unexported fields }
Client represents a Tupelo client for interacting with and listening to ChainTree events
func New ¶
func New(group *types.NotaryGroup, pubsub pubsubinterfaces.Pubsubber, store nodestore.DagStore) *Client
New instantiates a Client specific to a ChainTree/NotaryGroup. The store should probably be a bitswap peer. The store definitely needs access to the round confirmation, checkpoints, etc
func (*Client) CurrentRound ¶
func (c *Client) CurrentRound() *types.RoundConfirmationWrapper
func (*Client) NewAddBlockRequest ¶
func (c *Client) NewAddBlockRequest(ctx context.Context, tree *consensus.SignedChainTree, treeKey *ecdsa.PrivateKey, transactions []*transactions.Transaction) (*services.AddBlockRequest, error)
func (*Client) PlayTransactions ¶
func (c *Client) PlayTransactions(ctx context.Context, tree *consensus.SignedChainTree, treeKey *ecdsa.PrivateKey, transactions []*transactions.Transaction) (*gossip.Proof, error)
func (*Client) SendWithoutWait ¶
func (*Client) SubscribeToAbr ¶
func (*Client) SubscribeToRounds ¶
func (*Client) UnsubscribeFromAbr ¶
func (c *Client) UnsubscribeFromAbr(s subscription)
func (*Client) UnsubscribeFromRounds ¶
func (c *Client) UnsubscribeFromRounds(s subscription)
type ValidationNotification ¶
type ValidationNotification struct { Accepted []cid.Cid Checkpoint *types.CheckpointWrapper RoundConfirmation *types.RoundConfirmationWrapper CompletedRound *types.RoundWrapper }
Click to show internal directories.
Click to hide internal directories.