opreturn

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertHexToText

func ConvertHexToText(hexStr string) (readableStr string, validUTF8 bool, err error)

func ConvertTextToHex

func ConvertTextToHex(text string) (hexStr string)

Types

type JsonRpc

type JsonRpc struct {
	JsonRpc string        `json:"jsonrpc"`
	ID      string        `json:"id"`
	Method  string        `json:"method"`
	Params  []interface{} `json:"params"`
}

type OpReturn

type OpReturn struct {
	RpcUser                   string
	RpcPW                     string
	RpcConnect                string
	RpcPort                   string
	RpcPath                   string
	Address                   string
	PrivKey                   string
	PayInfos                  map[string]float64
	Message                   string
	MessageHex                string
	Unspents                  []Unspent
	Confirmations             int
	LimitFeePerVByte          float64
	Fee                       float64
	AmountBalanceUsedUnspends float64
	RawTx                     string
	SignedRawTx               string
	OpRetrunTxID              string
}

func (*OpReturn) Run

func (opReturn *OpReturn) Run() (err error)

type OpReturnReadable

type OpReturnReadable struct {
	BlockHash string
	BlockTime int64
	TxID      string
	Addresses []string
	Valid     bool
	Hex       string `json:",omitempty"`
	Readable  string `json:",omitempty"`
}

type OpReturnReadables

type OpReturnReadables struct {
	RpcUser    string
	RpcPW      string
	RpcConnect string
	RpcPort    string
	RpcPath    string
	Readables  []OpReturnReadable
}

func (*OpReturnReadables) RunInBlockHash

func (opReturnReadables *OpReturnReadables) RunInBlockHash(blockHash string) (err error)

func (*OpReturnReadables) RunInBlockNum

func (opReturnReadables *OpReturnReadables) RunInBlockNum(blockNum int64) (err error)

func (*OpReturnReadables) RunInTxIDs

func (opReturnReadables *OpReturnReadables) RunInTxIDs(txids []string, onlyShowOpReturnTxIDs ...bool) (err error)

type Payment

type Payment struct {
	RpcUser                   string
	RpcPW                     string
	RpcConnect                string
	RpcPort                   string
	RpcPath                   string
	Address                   string
	PrivKey                   string
	PayInfos                  map[string]float64
	Unspents                  []Unspent
	Confirmations             int
	LimitFeePerVByte          float64
	Fee                       float64
	AmountBalanceUsedUnspends float64
	RawTx                     string
	SignedRawTx               string
	PaymentTxID               string
}

func (*Payment) Run

func (payment *Payment) Run() (err error)

type RemoteFees

type RemoteFees struct {
	FastestFee  float64 `json:"fastestFee"`
	HalfHourFee float64 `json:"halfHourFee"`
	HourFee     float64 `json:"hourFee"`
	EconomyFee  float64 `json:"economyFee"`
	MinimumFee  float64 `json:"minimumFee"`
}

type Unspent

type Unspent struct {
	TxID          string
	Vout          int
	Amount        float64
	Confirmations int
	Expected      bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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