fydcoin

package
v0.0.0-...-fa8983d Latest Latest
Warning

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

Go to latest
Published: May 7, 2021 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MainnetMagic wire.BitcoinNet = 0xb92b3a21
)

Variables

View Source
var (
	MainNetParams chaincfg.Params
)

Functions

func GetChainParams

func GetChainParams(chain string) *chaincfg.Params

func NewFYDCoinRPC

func NewFYDCoinRPC(config json.RawMessage, pushHandler func(bchain.NotificationType)) (bchain.BlockChain, error)

NewFYDCoinRPC returns new FYDCoinRPC instance

Types

type FYDCoinParser

type FYDCoinParser struct {
	*btc.BitcoinParser
	// contains filtered or unexported fields
}

FYDCoinParser handle

func NewFYDCoinParser

func NewFYDCoinParser(params *chaincfg.Params, c *btc.Configuration) *FYDCoinParser

NewFYDCoinParser returns new FYDCoinParser instance

func (*FYDCoinParser) PackTx

func (p *FYDCoinParser) PackTx(tx *bchain.Tx, height uint32, blockTime int64) ([]byte, error)

PackTx packs transaction to byte array using protobuf

func (*FYDCoinParser) UnpackTx

func (p *FYDCoinParser) UnpackTx(buf []byte) (*bchain.Tx, uint32, error)

UnpackTx unpacks transaction from protobuf byte array

type FYDCoinRPC

type FYDCoinRPC struct {
	*btc.BitcoinRPC
}

FYDCoinRPC is an interface to JSON-RPC bitcoind service

func (*FYDCoinRPC) GetBlock

func (z *FYDCoinRPC) GetBlock(hash string, height uint32) (*bchain.Block, error)

GetBlock returns block with given hash.

func (*FYDCoinRPC) GetMempoolEntry

func (z *FYDCoinRPC) GetMempoolEntry(txid string) (*bchain.MempoolEntry, error)

GetMempoolEntry returns mempool data for given transaction

func (*FYDCoinRPC) GetTransactionForMempool

func (z *FYDCoinRPC) GetTransactionForMempool(txid string) (*bchain.Tx, error)

GetTransactionForMempool returns a transaction by the transaction ID. It could be optimized for mempool, i.e. without block time and confirmations

func (*FYDCoinRPC) Initialize

func (z *FYDCoinRPC) Initialize() error

Initialize initializes SnowGemRPC instance

Jump to

Keyboard shortcuts

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