aryacoin

package
v0.0.0-...-c1bac29 Latest Latest
Warning

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

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

Documentation

Index

Constants

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

Variables

View Source
var (
	MainNetParams chaincfg.Params
)

Functions

func GetChainParams

func GetChainParams(chain string) *chaincfg.Params

GetChainParams contains network parameters for the main SnowGem network, the regression test SnowGem network, the test SnowGem network and the simulation test SnowGem network, in this order

func NewAryacoinRPC

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

NewAryacoinRPC returns new AryacoinRPC instance

Types

type AryacoinParser

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

AryacoinParser handle

func NewAryacoinParser

func NewAryacoinParser(params *chaincfg.Params, c *btc.Configuration) *AryacoinParser

NewAryacoinParser returns new AryacoinParser instance

func (*AryacoinParser) PackTx

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

PackTx packs transaction to byte array using protobuf

func (*AryacoinParser) UnpackTx

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

UnpackTx unpacks transaction from protobuf byte array

type AryacoinRPC

type AryacoinRPC struct {
	*btc.BitcoinRPC
}

AryacoinRPC is an interface to JSON-RPC bitcoind service

func (*AryacoinRPC) GetBlock

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

GetBlock returns block with given hash.

func (*AryacoinRPC) GetMempoolEntry

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

GetMempoolEntry returns mempool data for given transaction

func (*AryacoinRPC) GetTransactionForMempool

func (z *AryacoinRPC) 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 (*AryacoinRPC) Initialize

func (z *AryacoinRPC) Initialize() error

Initialize initializes AryacoinRPC instance

Jump to

Keyboard shortcuts

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