Documentation ¶
Index ¶
- Variables
- type ChainClient
- func (b *ChainClient) ConfirmationsRequired(context.Context, bridgetypes.AssetID) (uint64, error)
- func (b *ChainClient) Height(context.Context) (uint64, error)
- func (b *ChainClient) ListenOutboundTransfer() <-chan observer.Transfer
- func (b *ChainClient) SignalInboundTransfer(context.Context, observer.Transfer) error
- func (b *ChainClient) Start(context.Context) error
- func (b *ChainClient) Stop(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidCfg = errorsmod.Register(ModuleName, 1, "invalid configuration") ErrRpcClient = errorsmod.Register(ModuleName, 2, "rpc client error") )
View Source
var ModuleName = "bitcoin-chain"
Functions ¶
This section is empty.
Types ¶
type ChainClient ¶
type ChainClient struct {
// contains filtered or unexported fields
}
func NewChainClient ¶
func NewChainClient( logger log.Logger, btcRpc *rpcclient.Client, vaultAddr string, fetchInterval time.Duration, lastObservedHeight uint64, chainParams chaincfg.Params, ) (*ChainClient, error)
NewChainClient returns new instance of `ChainClient`
func (*ChainClient) ConfirmationsRequired ¶
func (b *ChainClient) ConfirmationsRequired(context.Context, bridgetypes.AssetID) (uint64, error)
ConfirmationsRequired returns number of required tx confirmations
func (*ChainClient) Height ¶
func (b *ChainClient) Height(context.Context) (uint64, error)
Height returns current height of the Bitcoin chain
func (*ChainClient) ListenOutboundTransfer ¶
func (b *ChainClient) ListenOutboundTransfer() <-chan observer.Transfer
ListenOutboundTransfer returns receive-only channel with outbound transfer items
func (*ChainClient) SignalInboundTransfer ¶
SignalInboundTransfer sends `InboundTransfer` to Bitcoin
Click to show internal directories.
Click to hide internal directories.