immediate

package
v1.0.1-stable-dd60dab Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2019 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAuditPending = fmt.Errorf("audit pending")
View Source
var ErrSwapExpired = fmt.Errorf("swap expired")

Functions

func New

func New(cap int, builder ContractBuilder) tau.Task

Types

type Contract

type Contract interface {
	Initiate() error
	Audit() error
	Redeem([32]byte) error
	AuditSecret() ([32]byte, error)
	Refund() error
	Cost() blockchain.Cost
}

type ContractBuilder

type ContractBuilder interface {
	BuildSwapContracts(request SwapRequest) (Contract, Contract, error)
}

type DeleteSwap

type DeleteSwap struct {
	ID swap.SwapID
}

func (DeleteSwap) IsMessage

func (msg DeleteSwap) IsMessage()

type ReceiptUpdate

type ReceiptUpdate swap.ReceiptUpdate

func NewReceiptUpdate

func NewReceiptUpdate(id swap.SwapID, status int, native, foreign Contract) ReceiptUpdate

func (ReceiptUpdate) IsMessage

func (msg ReceiptUpdate) IsMessage()

type SwapRequest

type SwapRequest struct {
	Blob        swap.SwapBlob
	SendCost    blockchain.Cost
	ReceiveCost blockchain.Cost
}

func NewSwapRequest

func NewSwapRequest(blob swap.SwapBlob, sendCost, receiveCost blockchain.Cost) SwapRequest

func (SwapRequest) IsMessage

func (msg SwapRequest) IsMessage()

Jump to

Keyboard shortcuts

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