Java
Requirements
JDK 11
Accounts
Creation
Create an account from seed
import com.ltonetwork.client.core.AccountFactory;
String seed = "my seed phrase";
AccountFactory af = new AccountFactory('T');
Account acc = af.seed(seed);Create an account from sign public key
import com.ltonetwork.client.types.PublicKey;
import com.ltonetwork.client.core.AccountFactory;
PublicKey signPublicKey = new PublicKey("wJ4WH8dD88fSkNdFQRjaAhjFUZzZhV5yiDLDwNUnp6bYwRXrvWV8MJhQ9HL9uqMDG1n7XpTGZx7PafqaayQV8Rp", Encoding.BASE58);
AccountFactory af = new AccountFactory('T');
Account acc = af.createPublic(signPublicKey);Create an account from full info
Properties that are specified will be verified. Properties that are omitted will be generated where possible.
Signing (ED25519)
Sign a message
Verify a signature
Encryption (X25519)
Encrypt a message for another account
You can use senderAccount.encrypt(senderAccount, message); to encrypt a message for yourself.
Decrypt a message received from another account
You can use senderAccount.encrypt(senderAccount, message); to decrypt a message from yourself.
Public layer
Last updated