bcoins

package
v0.0.0-...-72d1e77 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset

type Asset struct {
	Name    string
	Unit    string
	Symbol  string
	Network *Network
}

func SelectAsset

func SelectAsset(symbol string) (Asset, error)

select an asset by symbol and return Asset struct and error coin symbol to lower case

type Network

type Network struct {
	Name           string
	P2PKH          byte
	P2SH           byte
	PrivateKeyID   byte
	HDCoinType     uint32
	HDPrivateKeyID [4]byte
	HDPublicKeyID  [4]byte

	Bech32HRPSegwit string
	// contains filtered or unexported fields
}

func (Network) ChainCgfMainNetParams

func (network Network) ChainCgfMainNetParams() *chaincfg.Params

set the chainparams correct for the given Network struct and returns the chaincfg.Params

type Transaction

type Transaction struct {
	AssetName          string `json:"asset_name"`
	AssetSymbol        string `json:"asset_symbol"`
	TxId               string `json:"txid"`
	SourceAddress      string `json:"source_address"`
	DestinationAddress string `json:"destination_address"`
	Amount             int64  `json:"amount"`
	UnsignedTx         string `json:"unsignedtx"`
	SignedTx           string `json:"signedtx"`
}

Jump to

Keyboard shortcuts

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