wmd

package
v2.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: GPL-3.0 Imports: 11 Imported by: 1

README

wmd

Build development environment

The requirements to build openwallet are:

  • Golang version 1.12 or later
  • xgo (Go CGO cross compiler)
  • Properly configured Go language environment
  • Golang supported operating system

源码编译跨平台工具

安装xgo(支持跨平台编译C代码)

官方github(目前还不支持go module) 支持go module的xgo fork

xgo的使用依赖docker。并且把要跨平台编译的项目文件加入到File sharing。


# 官方的目前还不支持go module编译,所以我们用了别人改造后能够给支持的fork版
$ go get -u github.com/gythialy/xgo
...
$ xgo -h
...

wmd--多币种钱包维护工具(Deprecated, please use go-openw-cli)

特点

wmd为了实现对多币种的钱包操作,规范了以下接口:

  • 初始币种配置流程。
  • 创建币种钱包流程。
  • 批量币种钱包地址流程。
  • 备份钱包流程。
  • 启动定时器汇总钱包流程。
编译wmd工具

# 本地系统编译
$ make clean build

# 跨平台编译wmd,更多可选平台可修改Makefile的$TARGETS变量
$ make clean wmd

wmd工具使用

wmd是一款多币种钱包维护工具。你只需要在服务器安装某币种的官方全节点钱包,并且wmd已经支持的币种。 你就可以使用wmd的规范的命令完成钱包维护工作。

钱包相关

# 查看./conf/[symbol].ini文件中与钱包相关的配置信息
$ ./wmd wallet config -s [symbol]

# 执行重新初始化钱包配置
$ ./wmd wallet config -s [symbol] -i

# 创建钱包,成功后,文件保存在./data/[symbol]/key/
$ ./wmd wallet new -s [symbol]

# 备份钱包私钥和账户相关文件,文件保存在./data/[symbol]/key/backup/
$ ./wmd wallet backup -s [symbol]

# 执行恢复钱包,提供钱包的备份文件
$ ./wmd wallet restore -s [symbol]

# 执行批量创建地址命令,文件保存在./conf/[symbol]/address/
$ ./wmd wallet batchaddr -s [symbol]

# 启动批量汇总监听器
$ ./wmd wallet startsum -s [symbol]

# 查询钱包列表
$ ./wmd wallet list -s [symbol]

# 发起转行交易
$ ./wmd wallet transfer -s [symbol]

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeManagerInterface

type NodeManagerInterface interface {
	// GetNodeStatus 节点状态
	GetNodeStatus(string) error
	// StartNodeFlow 创建节点
	CreateNodeFlow(string) error
	// StartNodeFlow 开启节点
	StartNodeFlow(string) error
	// StopNodeFlow 关闭节点
	StopNodeFlow(string) error
	// RestartNodeFlow 重启节点
	RestartNodeFlow(string) error
	// RemoveNodeFlow 移除节点
	RemoveNodeFlow(string) error
	// LogsNodeFlow 日志
	LogsNodeFlow(string) error
}

节点管理接口

type WalletManagerInterface

type WalletManagerInterface interface {
	//初始化配置流程
	InitConfigFlow() error
	//查看配置信息
	ShowConfig() error
	//创建钱包流程
	CreateWalletFlow() error
	//创建地址流程
	CreateAddressFlow() error
	//汇总钱包流程
	SummaryFollow() error
	//备份钱包流程
	BackupWalletFlow() error
	//查看钱包列表,显示信息
	GetWalletList() error
	//发送交易
	TransferFlow() error
	//恢复钱包
	RestoreWalletFlow() error
}

WalletManagerInterface 钱包管理器

Jump to

Keyboard shortcuts

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