bot

package
v0.0.0-...-e5993db Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetKey

func GetKey(index uint) (*wallet.PrivateKey, error)

Types

type Bot

type Bot struct {
	Addresses    []string
	Addr         wallet.Addr
	Key          wallet.PrivateKey
	TweetScraper *twitterscraper.Scraper
	ErrorChan    chan error
	TxMutex      sync.Mutex
	UpdateMutex  sync.Mutex
	Timer        *time.Timer
	Verbose      bool
	Down         bool
}

func NewBot

func NewBot(scraper *twitterscraper.Scraper, addresses []string, key wallet.PrivateKey, verbose bool, down bool) (*Bot, error)

func (*Bot) CheckForNewTweets

func (b *Bot) CheckForNewTweets(streams []strm.Stream) error

func (*Bot) MaintenanceListen

func (b *Bot) MaintenanceListen() error

func (*Bot) ProcessMissedTxs

func (b *Bot) ProcessMissedTxs() error

func (*Bot) Run

func (b *Bot) Run() error

func (*Bot) SafeUpdate

func (b *Bot) SafeUpdate() error

func (*Bot) SaveTx

func (b *Bot) SaveTx(tx graph.Tx) error

func (*Bot) SetAddresses

func (b *Bot) SetAddresses() error

func (*Bot) SetExistingCookies

func (b *Bot) SetExistingCookies() error

func (*Bot) UpdateStream

func (b *Bot) UpdateStream() error

type SaveTx

type SaveTx struct {
	Bot           *Bot
	Tx            graph.Tx
	Message       string
	SenderAddress string
	CoinIndex     uint32
	TxHash        chainhash.Hash
	Handled       bool
}

func NewSaveTx

func NewSaveTx(bot *Bot) *SaveTx

func (*SaveTx) FinishSave

func (s *SaveTx) FinishSave()

func (*SaveTx) HandleCreate

func (s *SaveTx) HandleCreate() error

func (*SaveTx) HandleDown

func (s *SaveTx) HandleDown() error

func (*SaveTx) HandleRequestMainBot

func (s *SaveTx) HandleRequestMainBot() error

func (*SaveTx) HandleRequestSubBot

func (s *SaveTx) HandleRequestSubBot(stream strm.Stream) error

func (*SaveTx) HandleTxType

func (s *SaveTx) HandleTxType() error

func (*SaveTx) HandleWithdraw

func (s *SaveTx) HandleWithdraw() error

func (*SaveTx) Save

func (s *SaveTx) Save(tx graph.Tx) error

func (*SaveTx) SetVars

func (s *SaveTx) SetVars(tx graph.Tx) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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