public class Account
extends java.lang.Object
| Constructor and Description |
|---|
Account(KeyPair keyPair,
NetworkType networkType) |
Account(java.lang.String privateKey,
NetworkType networkType)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
static Account |
createFromPrivateKey(java.lang.String privateKey,
NetworkType networkType)
Create an Account from a given private key.
|
Address |
getAddress()
Account address.
|
KeyPair |
getKeyPair()
Account keyPair containing public and private key.
|
java.lang.String |
getPrivateKey()
Account private key.
|
PublicAccount |
getPublicAccount()
Public account.
|
java.lang.String |
getPublicKey()
Account public key.
|
SignedTransaction |
sign(Transaction transaction)
Sign a transaction.
|
CosignatureSignedTransaction |
signCosignatureTransaction(CosignatureTransaction cosignatureTransaction)
Sign aggregate signature transaction.
|
SignedTransaction |
signTransactionWithCosignatories(AggregateTransaction transaction,
java.util.List<Account> cosignatories)
Sign transaction with cosignatories creating a new SignedTransaction.
|
public Account(@NotNull
java.lang.String privateKey,
NetworkType networkType)
privateKey - StringnetworkType - NetworkTypepublic Account(KeyPair keyPair, NetworkType networkType)
public static Account createFromPrivateKey(java.lang.String privateKey, NetworkType networkType)
privateKey - Private key from an accountnetworkType - NetworkTypeAccountpublic java.lang.String getPublicKey()
Stringpublic java.lang.String getPrivateKey()
Stringpublic KeyPair getKeyPair()
KeyPairpublic PublicAccount getPublicAccount()
PublicAccountpublic SignedTransaction sign(Transaction transaction)
transaction - The transaction to be signed.SignedTransactionpublic CosignatureSignedTransaction signCosignatureTransaction(CosignatureTransaction cosignatureTransaction)
cosignatureTransaction - The aggregate signature transaction.CosignatureSignedTransactionpublic SignedTransaction signTransactionWithCosignatories(AggregateTransaction transaction, java.util.List<Account> cosignatories)
transaction - The aggregate transaction to be signed.cosignatories - The list of accounts that will cosign the transactionSignedTransaction