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 *secp256k1.PrivateKey, to string, currency string, value float64, args any) (string, error)
GetTransaction(txHash string) (*common.Transaction, error)
}
Click to show internal directories.
Click to hide internal directories.