btc

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package Bitcoin Module

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAddressFromPrivateKey

func GetAddressFromPrivateKey(privateKey []byte, addressType common.AddressType, network *chaincfg.Params) (string, error)

Function GetAddressFromPrivateKey 从私钥获取地址

func GetAddressFromPublicKey

func GetAddressFromPublicKey(publicKey []byte, addressType common.AddressType, network *chaincfg.Params) (string, error)

Function GetAddressFromPublicKey 从公钥获取地址

Types

type Client

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

func NewClient

func NewClient(nodes []Node) *Client

Function NewClient 创建客户端

func (*Client) GetBalance

func (Self *Client) GetBalance(address string, token string) (float64, error)

Function GetBalance 查询余额

func (*Client) GetCurrentHeight

func (Self *Client) GetCurrentHeight() (uint64, error)

Function GetCurrentHeight 获取当前高度

type Currency

type Currency struct {
	Contract string `json:"," default:""`
	Decimals int    `json:","`
}

type Node

type Node struct {
	Host     string
	Weight   int
	User     string
	Password string
}

Jump to

Keyboard shortcuts

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