blockchain

package
v1.6.3 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: 10 Imported by: 0

Documentation

Overview

Package blockchain contains code for interacting with the decentr blockchain.

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidAddress = errors.New("invalid address")

ErrInvalidAddress is returned when address is invalid. It is unexpected situation.

Functions

func New added in v1.1.4

func New(b broadcaster.Broadcaster) *blockchain

New returns new instance of Blockchain.

Types

type Blockchain

type Blockchain interface {
	DistributeRewards(rewards []Reward) (tx string, err error)
	SendStakes(stakes []Stake, memo string) error
}

Blockchain is interface for interacting with the blockchain.

type Reward added in v1.4.0

type Reward struct {
	Receiver string
	ID       uint64
	Reward   sdk.Dec
}

Reward is a copy of operations.Reward but with string receiver instead of sdk.AccAddress.

type Stake added in v1.5.5

type Stake struct {
	Address string
	Amount  sdk.Int
}

Stake ...

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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