We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
when I use ontio java sdk I want transfer ont to another account,I fllow document ,here is my code:
try { Transaction tx = ontSdkClient.nativevm().ont() .makeTransfer(from, to, amount.longValue(), from, 20000, 500); com.github.ontio.account.Account acct = ontSdkClient.getWalletMgr() .getAccount(from, walletPwd); ontSdkClient.signTx(tx, new com.github.ontio.account.Account[][]{{acct}}); ontSdkClient.getConnect().sendRawTransaction(tx.toHexString()); txId = tx.hash().toHexString(); } catch (Exception e) { e.printStackTrace(); }
But when code executed .getAccount(from, walletPwd); I has something wrong, here is my log:
com.github.ontio.sdk.exception.SDKException: {"Desc":"Other Error,{"Desc":"Account Error,encryptedPriKey address password not match.","Error":51015}","Error":59000}
And I change the pom jar version ,whatever jar version I has same error,please help!!!
The text was updated successfully, but these errors were encountered:
@lishuo5263 Hi, Maybe you need to open your local wallet file firstly. Something like this:
OntSdk wm = OntSdk.getInstance(); wm.openWalletFile("walletfile.json");
Sorry, something went wrong.
No branches or pull requests
when I use ontio java sdk I want transfer ont to another account,I fllow document ,here is my code:
try {
Transaction tx = ontSdkClient.nativevm().ont()
.makeTransfer(from, to, amount.longValue(), from, 20000, 500);
com.github.ontio.account.Account acct = ontSdkClient.getWalletMgr()
.getAccount(from, walletPwd);
ontSdkClient.signTx(tx, new com.github.ontio.account.Account[][]{{acct}});
ontSdkClient.getConnect().sendRawTransaction(tx.toHexString());
txId = tx.hash().toHexString();
} catch (Exception e) {
e.printStackTrace();
}
But when code executed .getAccount(from, walletPwd); I has something wrong, here is my log:
com.github.ontio.sdk.exception.SDKException: {"Desc":"Other Error,{"Desc":"Account Error,encryptedPriKey address password not match.","Error":51015}","Error":59000}
And I change the pom jar version ,whatever jar version I has same error,please help!!!
The text was updated successfully, but these errors were encountered: