usecase

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUTXONotFound = errors.New("utxo not found")

Functions

This section is empty.

Types

type Usecase

type Usecase struct {
	// contains filtered or unexported fields
}

func New

func New(runesDg datagateway.RunesDataGateway, bitcoinClient btcclient.Contract) *Usecase

func (*Usecase) GetBalancesByPkScript

func (u *Usecase) GetBalancesByPkScript(ctx context.Context, pkScript []byte, blockHeight uint64, limit int32, offset int32) ([]*entity.Balance, error)

Use limit = -1 as no limit.

func (*Usecase) GetBalancesByRuneId

func (u *Usecase) GetBalancesByRuneId(ctx context.Context, runeId runes.RuneId, blockHeight uint64, limit int32, offset int32) ([]*entity.Balance, error)

Use limit = -1 as no limit.

func (*Usecase) GetLatestBlock

func (u *Usecase) GetLatestBlock(ctx context.Context) (types.BlockHeader, error)

func (*Usecase) GetRuneEntryByRuneId

func (u *Usecase) GetRuneEntryByRuneId(ctx context.Context, runeId runes.RuneId) (*runes.RuneEntry, error)

func (*Usecase) GetRuneEntryByRuneIdAndHeight

func (u *Usecase) GetRuneEntryByRuneIdAndHeight(ctx context.Context, runeId runes.RuneId, blockHeight uint64) (*runes.RuneEntry, error)

func (*Usecase) GetRuneEntryByRuneIdAndHeightBatch

func (u *Usecase) GetRuneEntryByRuneIdAndHeightBatch(ctx context.Context, runeIds []runes.RuneId, blockHeight uint64) (map[runes.RuneId]*runes.RuneEntry, error)

func (*Usecase) GetRuneEntryByRuneIdBatch

func (u *Usecase) GetRuneEntryByRuneIdBatch(ctx context.Context, runeIds []runes.RuneId) (map[runes.RuneId]*runes.RuneEntry, error)

func (*Usecase) GetRuneIdFromRune

func (u *Usecase) GetRuneIdFromRune(ctx context.Context, rune runes.Rune) (runes.RuneId, error)

func (*Usecase) GetRuneTransactions

func (u *Usecase) GetRuneTransactions(ctx context.Context, pkScript []byte, runeId runes.RuneId, fromBlock, toBlock uint64, limit int32, offset int32) ([]*entity.RuneTransaction, error)

Use limit = -1 as no limit.

func (*Usecase) GetRunesUTXOsByPkScript added in v0.3.0

func (u *Usecase) GetRunesUTXOsByPkScript(ctx context.Context, pkScript []byte, blockHeight uint64, limit int32, offset int32) ([]*entity.RunesUTXOWithSats, error)

func (*Usecase) GetRunesUTXOsByRuneIdAndPkScript added in v0.3.0

func (u *Usecase) GetRunesUTXOsByRuneIdAndPkScript(ctx context.Context, runeId runes.RuneId, pkScript []byte, blockHeight uint64, limit int32, offset int32) ([]*entity.RunesUTXOWithSats, error)

func (*Usecase) GetUTXOsOutputByLocation added in v0.4.0

func (u *Usecase) GetUTXOsOutputByLocation(ctx context.Context, txHash chainhash.Hash, outputIdx uint32) (*entity.RunesUTXOWithSats, error)

Jump to

Keyboard shortcuts

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