listener

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BTCBlock added in v0.5.0

type BTCBlock wire.MsgBlock

func (BTCBlock) GetTxHashes added in v0.5.0

func (b BTCBlock) GetTxHashes() []string

type BTCDaemonRpcClientExecutor added in v0.5.0

type BTCDaemonRpcClientExecutor struct {
	BaseDaemonRpcClientExecutor[BTCTx, BTCBlock]
}

func NewBTCDaemonRpcClientExecutor added in v0.5.0

func NewBTCDaemonRpcClientExecutor(log *zerolog.Logger, client *rpcclient.Client) *BTCDaemonRpcClientExecutor

type BTCTx added in v0.5.0

type BTCTx btcjson.TxRawResult

func (BTCTx) GetConfirmations added in v0.5.0

func (t BTCTx) GetConfirmations() uint64

func (BTCTx) GetTxId added in v0.5.0

func (t BTCTx) GetTxId() string

func (BTCTx) IsDoubleSpendSeen added in v0.5.0

func (t BTCTx) IsDoubleSpendSeen() bool

type BaseDaemonRpcClientExecutor added in v0.5.0

type BaseDaemonRpcClientExecutor[T SharedTx, B SharedBlock] struct {
	// contains filtered or unexported fields
}

func NewBaseDaemonRpcClientExecutor added in v0.5.0

func NewBaseDaemonRpcClientExecutor[T SharedTx, B SharedBlock](log *zerolog.Logger, client SharedDaemonRpcClient[T, B]) *BaseDaemonRpcClientExecutor[T, B]

func (*BaseDaemonRpcClientExecutor[T, B]) LastSyncedBlockHeight added in v0.5.0

func (d *BaseDaemonRpcClientExecutor[T, B]) LastSyncedBlockHeight() uint64

func (*BaseDaemonRpcClientExecutor[T, B]) NewBlockChan added in v0.5.0

func (d *BaseDaemonRpcClientExecutor[T, B]) NewBlockChan() <-chan B

func (*BaseDaemonRpcClientExecutor[T, B]) NewTxPoolChan added in v0.5.0

func (d *BaseDaemonRpcClientExecutor[T, B]) NewTxPoolChan() <-chan T

func (*BaseDaemonRpcClientExecutor[T, B]) Start added in v0.5.0

func (d *BaseDaemonRpcClientExecutor[T, B]) Start(startBlock uint64)

func (*BaseDaemonRpcClientExecutor[T, B]) Stop added in v0.5.0

func (d *BaseDaemonRpcClientExecutor[T, B]) Stop()

type DaemonRpcClientExecutor

type DaemonRpcClientExecutor[T SharedTx, B SharedBlock] interface {
	Start(startBlock uint64)
	Stop()
	NewBlockChan() <-chan B
	NewTxPoolChan() <-chan T
	LastSyncedBlockHeight() uint64
}

type MockDaemonRpcClientExecutor added in v0.5.0

type MockDaemonRpcClientExecutor[T SharedTx, B SharedBlock] struct {
	mock.Mock
}

MockDaemonRpcClientExecutor is an autogenerated mock type for the DaemonRpcClientExecutor type

func NewMockDaemonRpcClientExecutor added in v0.5.0

func NewMockDaemonRpcClientExecutor[T SharedTx, B SharedBlock](t interface {
	mock.TestingT
	Cleanup(func())
}) *MockDaemonRpcClientExecutor[T, B]

NewMockDaemonRpcClientExecutor creates a new instance of MockDaemonRpcClientExecutor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockDaemonRpcClientExecutor[T, B]) LastSyncedBlockHeight added in v0.5.0

func (_m *MockDaemonRpcClientExecutor[T, B]) LastSyncedBlockHeight() uint64

LastSyncedBlockHeight provides a mock function with no fields

func (*MockDaemonRpcClientExecutor[T, B]) NewBlockChan added in v0.5.0

func (_m *MockDaemonRpcClientExecutor[T, B]) NewBlockChan() <-chan B

NewBlockChan provides a mock function with no fields

func (*MockDaemonRpcClientExecutor[T, B]) NewTxPoolChan added in v0.5.0

func (_m *MockDaemonRpcClientExecutor[T, B]) NewTxPoolChan() <-chan T

NewTxPoolChan provides a mock function with no fields

func (*MockDaemonRpcClientExecutor[T, B]) Start added in v0.5.0

func (_m *MockDaemonRpcClientExecutor[T, B]) Start(startBlock uint64)

Start provides a mock function with given fields: startBlock

func (*MockDaemonRpcClientExecutor[T, B]) Stop added in v0.5.0

func (_m *MockDaemonRpcClientExecutor[T, B]) Stop()

Stop provides a mock function with no fields

type MockSharedBlock added in v0.5.0

type MockSharedBlock struct {
	mock.Mock
}

MockSharedBlock is an autogenerated mock type for the SharedBlock type

func NewMockSharedBlock added in v0.5.0

func NewMockSharedBlock(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockSharedBlock

NewMockSharedBlock creates a new instance of MockSharedBlock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockSharedBlock) GetTxHashes added in v0.5.0

func (_m *MockSharedBlock) GetTxHashes() []string

GetTxHashes provides a mock function with no fields

type MockSharedDaemonRpcClient added in v0.5.0

type MockSharedDaemonRpcClient[T SharedTx, B SharedBlock] struct {
	mock.Mock
}

MockSharedDaemonRpcClient is an autogenerated mock type for the SharedDaemonRpcClient type

func NewMockSharedDaemonRpcClient added in v0.5.0

func NewMockSharedDaemonRpcClient[T SharedTx, B SharedBlock](t interface {
	mock.TestingT
	Cleanup(func())
}) *MockSharedDaemonRpcClient[T, B]

NewMockSharedDaemonRpcClient creates a new instance of MockSharedDaemonRpcClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockSharedDaemonRpcClient[T, B]) GetBlockByHeight added in v0.5.0

func (_m *MockSharedDaemonRpcClient[T, B]) GetBlockByHeight(height uint64) (B, error)

GetBlockByHeight provides a mock function with given fields: height

func (*MockSharedDaemonRpcClient[T, B]) GetCoinType added in v0.5.0

func (_m *MockSharedDaemonRpcClient[T, B]) GetCoinType() db.CoinType

GetCoinType provides a mock function with no fields

func (*MockSharedDaemonRpcClient[T, B]) GetLastBlockHeight added in v0.5.0

func (_m *MockSharedDaemonRpcClient[T, B]) GetLastBlockHeight() (uint64, error)

GetLastBlockHeight provides a mock function with no fields

func (*MockSharedDaemonRpcClient[T, B]) GetNetworkType added in v0.5.0

func (_m *MockSharedDaemonRpcClient[T, B]) GetNetworkType() (NetworkType, error)

GetNetworkType provides a mock function with no fields

func (*MockSharedDaemonRpcClient[T, B]) GetTransactionPool added in v0.5.0

func (_m *MockSharedDaemonRpcClient[T, B]) GetTransactionPool() ([]string, error)

GetTransactionPool provides a mock function with no fields

func (*MockSharedDaemonRpcClient[T, B]) GetTransactions added in v0.5.0

func (_m *MockSharedDaemonRpcClient[T, B]) GetTransactions(txHashes []string) ([]T, error)

GetTransactions provides a mock function with given fields: txHashes

type MockSharedTx added in v0.5.0

type MockSharedTx struct {
	mock.Mock
}

MockSharedTx is an autogenerated mock type for the SharedTx type

func NewMockSharedTx added in v0.5.0

func NewMockSharedTx(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockSharedTx

NewMockSharedTx creates a new instance of MockSharedTx. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockSharedTx) GetConfirmations added in v0.5.0

func (_m *MockSharedTx) GetConfirmations() uint64

GetConfirmations provides a mock function with no fields

func (*MockSharedTx) GetTxId added in v0.5.0

func (_m *MockSharedTx) GetTxId() string

GetTxId provides a mock function with no fields

func (*MockSharedTx) IsDoubleSpendSeen added in v0.5.0

func (_m *MockSharedTx) IsDoubleSpendSeen() bool

IsDoubleSpendSeen provides a mock function with no fields

type NetworkType added in v0.5.0

type NetworkType uint8
const (
	MainnetXMR NetworkType = iota
	StagenetXMR
	TestnetXMR

	MainnetBTC
	TestnetBTC
	RegtestBTC
	SignetBTC
)

type SharedBTCDaemonRpcClient added in v0.5.0

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

func NewSharedBTCDaemonRpcClient added in v0.5.0

func NewSharedBTCDaemonRpcClient(client *rpcclient.Client) *SharedBTCDaemonRpcClient

func (*SharedBTCDaemonRpcClient) GetBlockByHeight added in v0.5.0

func (c *SharedBTCDaemonRpcClient) GetBlockByHeight(height uint64) (BTCBlock, error)

func (*SharedBTCDaemonRpcClient) GetCoinType added in v0.5.0

func (c *SharedBTCDaemonRpcClient) GetCoinType() db.CoinType

func (*SharedBTCDaemonRpcClient) GetLastBlockHeight added in v0.5.0

func (c *SharedBTCDaemonRpcClient) GetLastBlockHeight() (uint64, error)

func (*SharedBTCDaemonRpcClient) GetNetworkType added in v0.5.0

func (c *SharedBTCDaemonRpcClient) GetNetworkType() (NetworkType, error)

func (*SharedBTCDaemonRpcClient) GetTransactionPool added in v0.5.0

func (c *SharedBTCDaemonRpcClient) GetTransactionPool() ([]string, error)

func (*SharedBTCDaemonRpcClient) GetTransactions added in v0.5.0

func (c *SharedBTCDaemonRpcClient) GetTransactions(txHashes []string) ([]BTCTx, error)

type SharedBlock added in v0.5.0

type SharedBlock interface {
	GetTxHashes() []string
}

type SharedDaemonRpcClient added in v0.5.0

type SharedDaemonRpcClient[T SharedTx, B SharedBlock] interface {
	GetLastBlockHeight() (uint64, error)
	GetBlockByHeight(height uint64) (B, error)
	GetTransactionPool() ([]string, error)
	GetTransactions(txHashes []string) ([]T, error)
	GetNetworkType() (NetworkType, error)
	GetCoinType() db.CoinType
}

type SharedTx added in v0.5.0

type SharedTx interface {
	GetTxId() string
	GetConfirmations() uint64
	IsDoubleSpendSeen() bool
}

type SharedXMRDaemonRpcClient added in v0.5.0

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

func NewSharedXMRDaemonRpcClient added in v0.5.0

func NewSharedXMRDaemonRpcClient(client daemon.IDaemonRpcClient) *SharedXMRDaemonRpcClient

func (*SharedXMRDaemonRpcClient) GetBlockByHeight added in v0.5.0

func (c *SharedXMRDaemonRpcClient) GetBlockByHeight(height uint64) (XMRBlock, error)

func (*SharedXMRDaemonRpcClient) GetCoinType added in v0.5.0

func (c *SharedXMRDaemonRpcClient) GetCoinType() db.CoinType

func (*SharedXMRDaemonRpcClient) GetLastBlockHeight added in v0.5.0

func (c *SharedXMRDaemonRpcClient) GetLastBlockHeight() (uint64, error)

func (*SharedXMRDaemonRpcClient) GetNetworkType added in v0.5.0

func (c *SharedXMRDaemonRpcClient) GetNetworkType() (NetworkType, error)

func (*SharedXMRDaemonRpcClient) GetTransactionPool added in v0.5.0

func (c *SharedXMRDaemonRpcClient) GetTransactionPool() ([]string, error)

func (*SharedXMRDaemonRpcClient) GetTransactions added in v0.5.0

func (c *SharedXMRDaemonRpcClient) GetTransactions(txHashes []string) ([]XMRTx, error)

type XMRBlock added in v0.5.0

type XMRBlock daemon.GetBlockResult

func (XMRBlock) GetTxHashes added in v0.5.0

func (b XMRBlock) GetTxHashes() []string

type XMRDaemonRpcClientExecutor added in v0.5.0

type XMRDaemonRpcClientExecutor struct {
	BaseDaemonRpcClientExecutor[XMRTx, XMRBlock]
}

func NewXMRDaemonRpcClientExecutor added in v0.5.0

func NewXMRDaemonRpcClientExecutor(log *zerolog.Logger, client daemon.IDaemonRpcClient) *XMRDaemonRpcClientExecutor

type XMRTx added in v0.5.0

type XMRTx daemon.MoneroTx1

func (XMRTx) GetConfirmations added in v0.5.0

func (t XMRTx) GetConfirmations() uint64

func (XMRTx) GetTxId added in v0.5.0

func (t XMRTx) GetTxId() string

func (XMRTx) IsDoubleSpendSeen added in v0.5.0

func (t XMRTx) IsDoubleSpendSeen() bool

Jump to

Keyboard shortcuts

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