跳到主要内容

CLI 参考

配置文件有各自的专属页面:epic-server.tomlepic-wallet.toml

钱包命令

命令用途
init创建钱包
info余额摘要
txs交易日志
outputs原始输出(output)列表
address打印epicbox、支付证明及Tor地址
send发起出站转账
receive处理入站slate
finalize完成并广播转账
invoice发起发票slate
pay支付发票slate
cancel放弃转账并释放其已预留输出
post广播已最终确认的slate文件
repost重新广播或导出已存储的交易
listen运行接收监听器
owner_api运行Owner API
scan重新扫描链并重建输出状态
recover打印现有恢复助记词
account列出账户,或使用-c <name>创建账户
export_tx / import_tx在钱包之间移动交易日志条目
export_proof / verify_proof支付证明
change_password重新加密种子文件

钱包命令参数

声明于src/cmd/wallet_args.rs:66。默认值在括号中。

命令位置参数与参数
init-w/--cwd在当前目录创建,-s/--short_wordlist生成12个词的恢复助记词而非24个,-r/--recover从现有助记词初始化
info-c/--min_conf <n> (10)
txs-i/--id <id>-t/--txid <uuid>-l/--limit <n>-o/--offset <n>-s/--sort_order <asc or desc>(desc)
outputs-f/--show_full_history-l/--limit <n>-o/--offset <n>-s/--sort_order <asc or desc>(desc)
send<amount>位置参数,-d/--dest <destination>-m/--method <transport>(http),-c/--min_conf <n>(10),-s/--selection <all or smallest>(最小),-e/--estimate-selection-o/--change_outputs <n>(1),-y/--request_payment_proof-z/--proof_address <address>-g/--message <text>-t/--stored_tx <id>-b/--ttl_blocks <n>-v/--slate_version <n>-f/--fluff
receive-i/--input <file or emoji string>-m/--method <file or emoji>(file),-g/--message <text>
finalize-i/--input <file>-m/--method <file or emoji>(file),-d/--dest <file>保存已最终确认的slate,-n/--nopost最终确认但不广播,-f/--fluff
invoice<amount>位置参数,-d/--dest <file>-g/--message <text>-v/--slate_version <n>
pay-i/--input <file>-m/--method <file, http or self>(file),-d/--dest <destination>-c/--min_conf <n>(10),-s/--selection <all or smallest>(all),-e/--estimate-selection-g/--message <text>-b/--ttl_blocks <n>
cancel-i/--id <id>-t/--txid <uuid>
post-i/--input <file>, -f/--fluff
repost-i/--id <id>,必填,-m/--dumpfile <file>写入交易而不广播,-f/--fluff
listen-m/--method <http, keybase or epicbox>(http),-l/--port <n>-n/--no_tor
owner_api-l/--port <n>--run_foreign在同一端口提供Foreign API服务
scan-s/--start_height <n> (1), -d/--delete_unconfirmed
export_tx-o/--output <file>,必填,-i/--id <id>--all--format <csv or json>(json)
import_tx-i/--input <file>,必填,--format <csv or json>(json)
export_proof<file>位置参数,-i/--id <id>-t/--txid <uuid>
verify_proof<file> 位置参数
change_password<old password><new password> 位置参数,省略时逐一提示输入,以及 --remove-backup

-f/--fluff 直接广播,而不通过Dandelion中继。-e/--estimate-selection 在不构建交易的情况下打印每种选择策略的手续费。

-m 的发送传输方式:httpfileselfkeybaseemojiepicbox,默认为httpreceivefinalize 接受fileemoji,默认为filepay 接受filehttpself。参见传输方式

change_password 复制种子文件,用新密码重新加密,并在新种子与旧助记词验证通过后删除副本。--remove-backup 保留副本(src/cmd/wallet_args.rs:452)。

全局参数,置于子命令之前:-p <password>-a <account>(默认为default)、-r <node url>-t <dir>/--top_level_dir-c <dir>/--current_dir-e/--external-s/--show_spent--offline_mode,以及网络选择参数--floonet--usernet

-w/--cwd 是仅用于init 的参数,不接受值,因此epic-wallet -w . init 无效。若要操作~/.epic/<network> 之外的钱包,请从该目录运行命令或传入--current_dir <path>

节点命令

命令用途
epic运行节点
epic server config将新的 epic-server.toml 写入当前目录
epic server run在当前控制台运行节点
epic client status节点状态
epic client listconnectedpeers已连接的对等节点
epic client ban -p <ip:port>封禁对等节点
epic client unban -p <ip:port>解除封禁
epic taxes -w <wallet listener> -g <count>生成基金会 coinbase。-p <dir> 设置输出目录,-s <height> 设置起始区块高度

epic server 还接受-c/--config_file <path>-s/--seed <ip:port>(用于覆盖种子节点),以及-w/--wallet_url <url>(用于设置Stratum coinbase监听器)。顶级参数为--floonet--usernet。声明于src/bin/cmd/epic_args.rs:18

区块策略和API监听地址在配置文件中设置,而非通过命令行。参见epic-server.toml区块策略

端口

端口服务各网络端口偏移
3413Node API是。floonet 13413,usernet 23413
3414Node P2P是。floonet 13414,usernet 23414
3415Wallet Foreign API是。floonet 13415,usernet 23415
3416Node Stratum 服务器是。floonet 13416,usernet 23416
3420Wallet Owner API否,所有网络相同
443Epicbox中继不适用

网络

网络参数目录
Mainnet~/.epic/main
Floonet--floonet~/.epic/floo
Usernet--usernet~/.epic/user
自动化测试无,由测试套件选择,而非命令行~/.epic/auto

Coinbase成熟度因网络而异。参见时序

Floonet没有在线DNS种子,因此需通过epic server -s 将节点互相指向对方来运行。usernet链通过Stratum使用epic-miner 产生区块,另加peer_min_preferred_outbound_count = 0only_randomx = true。参见运行本地网络

Epicbox地址携带两字节base58check版本前缀,mainnet和usernet上为[1, 0],floonet上为[1, 136]。钱包解析来自其他网络的地址时返回InvalidBase58Versionlibwallet/src/epicbox_address.rs:23)。

数据目录

节点。 chain_dataepic-server.tomlepic-server.log.api_secret。不持有任何密钥。删除chain_data 需要重新同步。

钱包。 wallet_data/ 包含种子文件和数据库,另有epic-wallet.tomlepic-wallet.log.owner_api_secret.api_secretwallet_tor/。数据库为SQLite,位于wallet_data/db/sqlite/epic.db,存储交易历史、账户标签和支付证明记录。epic-wallet scan 从链重建输出(output)和余额,而非从历史记录重建。关于备份内容及恢复方法,参见备份与恢复

下一步