oracle

package
Version: v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OracleSource

type OracleSource interface {
	Ok(conds *deposit.CDA) (bool, string, error)
}

OracleSource defines an input for the SendOracle.

type SendOracle

type SendOracle interface {
	// OkToSend tells whether it makes sense to send a transaction
	// to the given conditional deposit address.
	OkToSend(conds *deposit.CDA) (bool, string, error)
}

SendOracle tells whether it makes sense to send a transaction or not by using its sources to make a decision.

func New

func New(sources ...OracleSource) SendOracle

New creates a new SendOracle which uses the provided sources to make its decision.

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL