Wallet-CLI란?
Wallet-CLI는 안전한 로컬 환경에서 transaction의 signing과 broadcasting을 on-chain data에 액세스 하기 위해 TRON 네트워크를 지원하는 상호작용형 command-line 지갑이다. Wallet-CLI는 키 관리를 지원하고 개인 키를 지갑으로 import 할 수 있으며 대칭 암호화 알고리즘으로 개인 키를 암호화하고 키 저장소 파일에 저장한다. on-chain data를 로컬에 저장하지 않고 gRPC를 사용하여 Java-tron 노드와 통신한다. 또한 Wallet-CLI와 연결할 Java-tron 노드를 구성해야 한다.
Wallet-CLI 전송 프로세스
사용자는 먼저 Login 명령을 실행하여 지갑을 잠금 해제 한 다음 SendCoin 명령을 실행하여 TRX를 전송한다. Wallet-CLI는 로컬에서 transaction을 build하고 서명한 다음 Java-tron 노드의 BroadcastTransaction gRPC API를 호출하여 transaction을 broadcasting 한다. broadcast가 성공한 후에 Java-tron 노드는 transaction hash를 Wallet-CLI로 반환하고 Wallet-CLI는 transaction hash를 사용자에게 표시해 준다.
Wallet-CLI 설치하기
git clone으로 Wallet-CLI 다운로드
git clone https://github.com/tronprotocol/wallet-cli.git
config.conf 수정
/wallet-cli/src/main/resources 경로에 있는 config.conf 파일을 수정한다.
net {
type = mainnet
}
fullnode = {
ip.list = [
"127.0.0.1:50051"
]
}
#soliditynode = {
# // the IPs in this list can only be totally set to solidity or pBFT.
# ip.list = [
# "127.0.0.1:50052" // default solidity
# ]
# ip.list = [
# "127.0.0.1:50071" // or pBFT
# ]
#}
RPC_version = 2
# This field used in shielded transaction. It is recommended that this field is set to the block
# number in which the earliest relevant shielded contract was created. If the exact number is not
# known, this field can be set as follows. If used in mainnet, please set 22690588. If used in Nile
# testnet, please set 6380000. Otherwise, please set 0.
blockNumberStartToScan = 22690588
Wallet-CLI 빌드하기
cd wallet-cli
./gradlew build
Wallet-CLI 실행하기
빌드를 성공하게 되면 wallet-cli/build 디렉토리가 생성된다. libs 경로로 이동하여 wallet-cli를 실행할 수 있다.
cd wallet-cli/build/libs
java -jar wallet-cli.jar
Reference
GitHub - tronprotocol/wallet-cli: Wallet CLI
Wallet CLI. Contribute to tronprotocol/wallet-cli development by creating an account on GitHub.
github.com
What is Wallet-CLI - Java Tron
What is Wallet-CLI? Wallet-Cli is an interactive command-line wallet that supports the TRON network for signing and broadcasting transactions in a secure local environment, as well as access to on-chain data. Wallet-Cli supports key management, you can imp
tronprotocol.github.io
'Blockchain > Tron' 카테고리의 다른 글
[트론] 풀노드(FullNode) 데이터 백업 파일 다운로드 받을 수 있는 사이트 (0) | 2023.01.25 |
---|---|
[트론] Linux에 트론 풀노드(FullNode) 세팅하기 (0) | 2023.01.18 |
[트론] OpenZeppelin을 활용하여 나만의 트론 토큰 발급하기 (0) | 2021.12.30 |
[트론] 테스트넷에서 나만의 TRC20 코인 만들기 (0) | 2021.12.28 |