chain

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainClient

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

func NewChainClient

func NewChainClient(chain common.Chain, nodes map[string]int) *ChainClient

@title 创建链客户端 @param chain common.Chain 链类型 @param nodes map[string]int 节点 @return _ *ChainClient 链客户端

func (*ChainClient) Chain

func (Self *ChainClient) Chain() common.Chain

@title 链类型 @param Self *ChainClient @return _ common.Chain 链类型

func (*ChainClient) Nodes

func (Self *ChainClient) Nodes() map[string]int

@title 节点 @param Self *ChainClient @return _ map[string]int 节点

type IChainClient

type IChainClient interface {
	Chain() common.Chain
	GetCurrentHeight() (uint64, error)
	GetBalance(address string, currency string, args any) (float64, error)
	Transfer(privateKey *ecdsa.PrivateKey, to string, currency string, value float64, args any) (string, error)
	GetTransaction(txHash string) (*common.Transaction, error)
}

Jump to

Keyboard shortcuts

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