如何在 web3j 的帮助下在 android 应用程序中使用私钥导入我的以太坊钱包?

问题描述

帮我解决当我在文本区域输入我的私钥时以太坊智能合约获取我的钱包的问题

Use WalletUtils functionality
The WalletUtils class can be used to load your credentials from varIoUs 
formats:

WalletUtils.loadCredentials(String password,String source)
WalletUtils.loadBip39Credentials(String password,String mnemonic)
WalletUtils.loadBip39Credentials(String password,String mnemonic)
WalletUtils.loadJsonCredentials(String password,String content)

http://docs.web3j.io/latest/transactions/credentials/#use-walletutils-functionality

These are the methods provided by the web3j library can anyone help me out to import my wallet from 
ethereum using private key??

解决方法

在智能合约中输入您的私钥不是一个好主意。保存在区块链上的所有内容都公开可见。因此,如果您在智能合约中输入您的私钥,任何人都可以看到它。最好从你的钱包向合约发送以太币,而不是让智能合约按照你的规则管理它们。