npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

jcc-jingtum-tool

v0.0.12

Published

jccdex jcc jingtum tool

Downloads

5

Readme

jcc-jingtum-tool

npm Build Status npm downloads

jcc-jingtum-tool 是一个命令行工具,可以快速的通过参数或者配置文件形式操作 SWTC 链,实现转账,查询余额,多签名操作。

Installation 安装

sudo npm install -g jcc-jingtum-tool --unsafe-perm=true

wallet and configuration 钱包和配置

在用户的目录下存在.jcc-jingtum-tool/config.json 文件,类似配置

{
  "server" : "https://srje115qd43qw2.swtc.top/",
  "wallet" : {"address": "jxxx", "secret": "sxxxx"}
}

注意:不能确认在安全情况下,不要在配置文件中使用明文保存密钥,尽量使用 keystore 文件

用户可以指定配置文件路径

jcc-jingtum-tool --config myconfig.json

normal operation 常规操作

  • 创建钱包
jcc-jingtum-tool --wallet_create
  • 创建钱包并保存为 keystore 文件
jcc-jingtum-tool --wallet_create --save_wallet
  • 导入私钥存为 keystore 文件
jcc-jingtum-tool --import_private_to_keystore
  • 查询 rpc 节点信息
jcc-jingtum-tool --server_info
  • 查询区块
jcc-jingtum-tool --ledger 22622884
jcc-jingtum-tool --ledger current
jcc-jingtum-tool --ledger closed
  • 查询交易
jcc-jingtum-tool --transaction AABBe089f12c9d4fcd82e47c3d3b56940c9ad6e51a9c7b5dfec4337f5fb4f58e
  • 获取余额
jcc-jingtum-tool --balance jLyU8xB3D2VyjYkrVBU6XoW2Z9Qe9t2Xew
  • 获取账号状态
jcc-jingtum-tool --account_info jLyU8xB3D2VyjYkrVBU6XoW2Z9Qe9t2Xew
  • 获取账号的 seq

可以通过-seq 参数指定交易的 seq,否则 seq 通过 getSeq 从链上查询

  • 转账
# 从配置 (config.json) 的钱包向目的地址转账
jcc-jingtum-tool --transfer jLyU8xB3D2VyjYkrVBU6XoW2Z9Qe9t2Xew --amount 0.000001
jcc-jingtum-tool --transfer jLyU8xB3D2VyjYkrVBU6XoW2Z9Qe9t2Xew --amount 0.000001 --token JSLASH --memo "test"
  • 创建多签名钱包
# 创建多签名钱包
jcc-jingtum-tool --keystore jH8kqWhBv2u4188gCvof6EK3EgQKRoKmGy  --multi_create "2,jMETckC3Wtq2jAbrdHwbhCwLRxatboXrEt,1,jP3gCE8keCarT9Q25ceK3hJwhLv2wEG8Nv,1,jaLwe24yofQeejkNcBRJRsyk7Q9Y5mi2JA,1"

# 删除多签名钱包
jcc-jingtum-tool --keystore jH8kqWhBv2u4188gCvof6EK3EgQKRoKmGy  --multi_create "0"

# 通过多签的方式删除多签钱包
jcc-jingtum-tool --sign_for jH8kqWhBv2u4188gCvof6EK3EgQKRoKmGy  --multi_create "0" --keystore jMETckC3Wtq2jAbrdHwbhCwLRxatboXrEt --save_sign s1.json

jcc-jingtum-tool --sign_for jH8kqWhBv2u4188gCvof6EK3EgQKRoKmGy  --multi_create "0" --keystore jP3gCE8keCarT9Q25ceK3hJwhLv2wEG8Nv --save_sign s2.json

jcc-jingtum-tool --sign_for jH8kqWhBv2u4188gCvof6EK3EgQKRoKmGy  --multi_create "0" --keystore jaLwe24yofQeejkNcBRJRsyk7Q9Y5mi2JA --save_sign s3.json

# 随后可以将s1.json s2.json s3.json文件名作为参数 执行 --multi_sign_commit

# 获取多签名状态
jcc-jingtum-tool --get_multi jH8kqWhBv2u4188gCvof6EK3EgQKRoKmGy
  • 多签名转账
# 多签名钱包生成签名内容
jcc-jingtum-tool --transfer jLyU8xB3D2VyjYkrVBU6XoW2Z9Qe9t2Xew --amount 0.000001 --token JSLASH --memo "test multi sign" --sign_for jH8kqWhBv2u4188gCvof6EK3EgQKRoKmGy --keystore jMETckC3Wtq2jAbrdHwbhCwLRxatboXrEt --save_sign s1.json

jcc-jingtum-tool --transfer jLyU8xB3D2VyjYkrVBU6XoW2Z9Qe9t2Xew --amount 0.000001 --token JSLASH --memo "test multi sign" --sign_for jH8kqWhBv2u4188gCvof6EK3EgQKRoKmGy --keystore jP3gCE8keCarT9Q25ceK3hJwhLv2wEG8Nv --save_sign s2.json

jcc-jingtum-tool --transfer jLyU8xB3D2VyjYkrVBU6XoW2Z9Qe9t2Xew --amount 0.000001 --token JSLASH --memo "test multi sign" --sign_for jH8kqWhBv2u4188gCvof6EK3EgQKRoKmGy --keystore jaLwe24yofQeejkNcBRJRsyk7Q9Y5mi2JA --save_sign s3.json

# 转SWT
jcc-jingtum-tool --transfer jLyU8xB3D2VyjYkrVBU6XoW2Z9Qe9t2Xew --amount 0.1 --memo "test multi sign" --sign_for jH8kqWhBv2u4188gCvof6EK3EgQKRoKmGy --keystore jMETckC3Wtq2jAbrdHwbhCwLRxatboXrEt --save_sign s1.json

jcc-jingtum-tool --transfer jLyU8xB3D2VyjYkrVBU6XoW2Z9Qe9t2Xew --amount 0.1 --memo "test multi sign" --sign_for jH8kqWhBv2u4188gCvof6EK3EgQKRoKmGy --keystore jP3gCE8keCarT9Q25ceK3hJwhLv2wEG8Nv --save_sign s2.json

jcc-jingtum-tool --transfer jLyU8xB3D2VyjYkrVBU6XoW2Z9Qe9t2Xew --amount 0.1 --memo "test multi sign" --sign_for jH8kqWhBv2u4188gCvof6EK3EgQKRoKmGy --keystore jaLwe24yofQeejkNcBRJRsyk7Q9Y5mi2JA --save_sign s3.json

# 多签名交易执行
jcc-jingtum-tool --multi_sign_commit "s1.json,s2.json,s3.json"
  • 多签名启用禁用主密钥
# 使用主密钥禁用
jcc-jingtum-tool --disable_secret --keystore jH8kqWhBv2u4188gCvof6EK3EgQKRoKmGy

# 使用多签启用主密钥
jcc-jingtum-tool --enable_secret --sign_for jH8kqWhBv2u4188gCvof6EK3EgQKRoKmGy --keystore jMETckC3Wtq2jAbrdHwbhCwLRxatboXrEt --save_sign s1.json

jcc-jingtum-tool --enable_secret --sign_for jH8kqWhBv2u4188gCvof6EK3EgQKRoKmGy --keystore jP3gCE8keCarT9Q25ceK3hJwhLv2wEG8Nv --save_sign s2.json

jcc-jingtum-tool --enable_secret --sign_for jH8kqWhBv2u4188gCvof6EK3EgQKRoKmGy --keystore jaLwe24yofQeejkNcBRJRsyk7Q9Y5mi2JA --save_sign s3.json
  • 挂单
# 挂单
jcc-jingtum-tool --create_order --keystore jH8kqWhBv2u4188gCvof6EK3EgQKRoKmGy --createOrder 1/SWT//1/JUSDT/

# 使用多签挂单
jcc-jingtum-tool --createOrder 1/JSLASH//1/JUSDT/ --sign_for jH8kqWhBv2u4188gCvof6EK3EgQKRoKmGy --keystore jMETckC3Wtq2jAbrdHwbhCwLRxatboXrEt --save_sign s1.json

jcc-jingtum-tool --createOrder 1/JSLASH//1/JUSDT/ --sign_for jH8kqWhBv2u4188gCvof6EK3EgQKRoKmGy --keystore jP3gCE8keCarT9Q25ceK3hJwhLv2wEG8Nv --save_sign s2.json

jcc-jingtum-tool --createOrder 1/JSLASH//1/JUSDT/ --sign_for jH8kqWhBv2u4188gCvof6EK3EgQKRoKmGy --keystore jaLwe24yofQeejkNcBRJRsyk7Q9Y5mi2JA --save_sign s3.json

# 查询挂单
jcc-jingtum-tool --getOrders jH8kqWhBv2u4188gCvof6EK3EgQKRoKmGy

# 取消挂单
jcc-jingtum-tool --cancelOrder 96

# 使用多签取消挂单
jcc-jingtum-tool --cancelOrder 97 --sign_for jH8kqWhBv2u4188gCvof6EK3EgQKRoKmGy --keystore jMETckC3Wtq2jAbrdHwbhCwLRxatboXrEt --save_sign s1.json

jcc-jingtum-tool --cancelOrder 97 --sign_for jH8kqWhBv2u4188gCvof6EK3EgQKRoKmGy --keystore jP3gCE8keCarT9Q25ceK3hJwhLv2wEG8Nv --save_sign s2.json

jcc-jingtum-tool --cancelOrder 97 --sign_for jH8kqWhBv2u4188gCvof6EK3EgQKRoKmGy --keystore jaLwe24yofQeejkNcBRJRsyk7Q9Y5mi2JA --save_sign s3.json
  • 设置 trustline
# 查询trustline
jcc-jingtum-tool --getLimit jH8kqWhBv2u4188gCvof6EK3EgQKRoKmGy

# 设置trustline
jcc-jingtum-tool --setLimit 10/JUSDT/ --keystore jH8kqWhBv2u4188gCvof6EK3EgQKRoKmGy

# 使用多签设置trustline
jcc-jingtum-tool --setLimit 11/JUSDT/ --sign_for jH8kqWhBv2u4188gCvof6EK3EgQKRoKmGy --keystore jMETckC3Wtq2jAbrdHwbhCwLRxatboXrEt --save_sign s1.json

jcc-jingtum-tool --setLimit 11/JUSDT/ --sign_for jH8kqWhBv2u4188gCvof6EK3EgQKRoKmGy --keystore jP3gCE8keCarT9Q25ceK3hJwhLv2wEG8Nv --save_sign s2.json

jcc-jingtum-tool --setLimit 11/JUSDT/ --sign_for jH8kqWhBv2u4188gCvof6EK3EgQKRoKmGy --keystore jaLwe24yofQeejkNcBRJRsyk7Q9Y5mi2JA --save_sign s3.json
  • 黑名单相关
# 查询trustline
jcc-jingtum-tool --getLimit jH8kqWhBv2u4188gCvof6EK3EgQKRoKmGy

# 设置trustline
jcc-jingtum-tool --setLimit 10/JUSDT/ --keystore jH8kqWhBv2u4188gCvof6EK3EgQKRoKmGy

# 使用多签设置trustline
jcc-jingtum-tool --setLimit 11/JUSDT/ --sign_for jH8kqWhBv2u4188gCvof6EK3EgQKRoKmGy --keystore jMETckC3Wtq2jAbrdHwbhCwLRxatboXrEt --save_sign s1.json

jcc-jingtum-tool --setLimit 11/JUSDT/ --sign_for jH8kqWhBv2u4188gCvof6EK3EgQKRoKmGy --keystore jP3gCE8keCarT9Q25ceK3hJwhLv2wEG8Nv --save_sign s2.json

jcc-jingtum-tool --setLimit 11/JUSDT/ --sign_for jH8kqWhBv2u4188gCvof6EK3EgQKRoKmGy --keystore jaLwe24yofQeejkNcBRJRsyk7Q9Y5mi2JA --save_sign s3.json