core

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CoreZMQReceiver

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

CoreZMQReceiver receives ZMQ messages from Dogecoin Core. CAUTION: the protocol is not authenticated! CAUTION: subscribers MUST validate the received data since it may be out of date, incomplete or even invalid (fake)

func NewCoreZMQReceiver

func NewCoreZMQReceiver(bus giga.MessageBus, config giga.Config) (*CoreZMQReceiver, error)

func (*CoreZMQReceiver) Run

func (z *CoreZMQReceiver) Run(started, stopped chan bool, stop chan context.Context) error

func (*CoreZMQReceiver) Subscribe

func (e *CoreZMQReceiver) Subscribe(ch chan<- giga.NodeEvent)

type L1CoreRPC

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

func NewDogecoinCoreRPC

func NewDogecoinCoreRPC(config giga.Config) (*L1CoreRPC, error)

NewDogecoinCoreRPC returns a giga.L1 implementor that uses dogecoin-core's RPC

func (*L1CoreRPC) DecodeTransaction

func (l *L1CoreRPC) DecodeTransaction(txn_hex string) (txn giga.RawTxn, err error)

func (*L1CoreRPC) EstimateFee

func (l *L1CoreRPC) EstimateFee(confirmTarget int) (feePerKB giga.CoinAmount, err error)

func (*L1CoreRPC) GetBestBlockHash

func (l *L1CoreRPC) GetBestBlockHash() (blockHash string, err error)

func (*L1CoreRPC) GetBlock

func (l *L1CoreRPC) GetBlock(blockHash string) (txn giga.RpcBlock, err error)

func (*L1CoreRPC) GetBlockCount

func (l *L1CoreRPC) GetBlockCount() (blockCount int64, err error)

func (*L1CoreRPC) GetBlockHash

func (l *L1CoreRPC) GetBlockHash(height int64) (hash string, err error)

func (*L1CoreRPC) GetBlockHeader

func (l *L1CoreRPC) GetBlockHeader(blockHash string) (txn giga.RpcBlockHeader, err error)

func (*L1CoreRPC) GetBlockHex

func (l *L1CoreRPC) GetBlockHex(blockHash string) (hex string, err error)

func (*L1CoreRPC) GetTransaction

func (l *L1CoreRPC) GetTransaction(txnHash string) (txn giga.RawTxn, err error)

func (*L1CoreRPC) MakeAddress

func (l *L1CoreRPC) MakeAddress(isTestNet bool) (giga.Address, giga.Privkey, error)

func (*L1CoreRPC) MakeChildAddress

func (l *L1CoreRPC) MakeChildAddress(privkey giga.Privkey, addressIndex uint32, isInternal bool) (giga.Address, error)

func (*L1CoreRPC) MakeTransaction

func (l *L1CoreRPC) MakeTransaction(inputs []giga.UTXO, outputs []giga.NewTxOut, fee giga.CoinAmount, change giga.Address, private_key giga.Privkey) (giga.NewTxn, error)

func (*L1CoreRPC) Send

func (l *L1CoreRPC) Send(txnHex string) (txid string, err error)

Jump to

Keyboard shortcuts

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