promises

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2019 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmptyExtra

type EmptyExtra struct {
}

func (EmptyExtra) Hash

func (EmptyExtra) Hash() []byte

type ExtraData

type ExtraData interface {
	Hash() []byte
}

type IssuedPromise

type IssuedPromise struct {
	Promise
	IssuerSignature []byte
}

func SignByPayer

func SignByPayer(promise *Promise, payer identity.Signer) (*IssuedPromise, error)

func (*IssuedPromise) Bytes

func (ip *IssuedPromise) Bytes() []byte

func (*IssuedPromise) IssuerAddress

func (ip *IssuedPromise) IssuerAddress() (common.Address, error)

type Promise

type Promise struct {
	Extra    ExtraData
	Receiver common.Address
	SeqNo    uint64
	Amount   uint64
}

func (*Promise) Bytes

func (p *Promise) Bytes() []byte

type PromiseClearing

type PromiseClearing struct {
	Address common.Address
	abigen.IdentityPromisesSession
}

func DeployPromiseClearer

func DeployPromiseClearer(owner *bind.TransactOpts, erc20Token common.Address, fee int64, backend bind.ContractBackend) (*PromiseClearing, error)

func NewPromiseClearer

func NewPromiseClearer(transactOpts *bind.TransactOpts, contract *abigen.IdentityPromises, address common.Address) *PromiseClearing

func (*PromiseClearing) BindForEvents

func (pc *PromiseClearing) BindForEvents(eventChan chan<- *abigen.IdentityPromisesPromiseCleared) (event.Subscription, error)

func (*PromiseClearing) ClearReceivedPromise

func (pc *PromiseClearing) ClearReceivedPromise(promise *ReceivedPromise) error

func (*PromiseClearing) LastClearedPromise

func (pc *PromiseClearing) LastClearedPromise(sender common.Address, receiver common.Address) (uint64, error)

func (*PromiseClearing) RegisterIdentities

func (pc *PromiseClearing) RegisterIdentities(identities ...registry.IdentityHolder) error

type ReceivedPromise

type ReceivedPromise struct {
	IssuedPromise
	ReceiverSignature []byte
}

func SignByReceiver

func SignByReceiver(promise *IssuedPromise, receiver identity.Signer) (*ReceivedPromise, error)

Jump to

Keyboard shortcuts

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