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.
|
static Account |
generateNewAccount(NetworkType networkType)
Generates an new Account for provided network type
|
Address |
getAddress()
Account address.
|
KeyPair |
getKeyPair()
Account keyPair containing public and private key.
|
NetworkType |
getNetworkType() |
java.lang.String |
getPrivateKey()
Account private key.
|
PublicAccount |
getPublicAccount()
Public account.
|
java.lang.String |
getPublicKey()
Account public key.
|
SignedTransaction |
sign(Transaction transaction,
java.lang.String generationHash)
Sign a transaction.
|
CosignatureSignedTransaction |
signCosignatureTransaction(CosignatureTransaction cosignatureTransaction)
Sign aggregate signature transaction.
|
CosignatureSignedTransaction |
signCosignatureTransaction(java.lang.String transactionHash)
Creates a CosignatureSignedTransaction from a hash.
|
SignedTransaction |
signTransactionGivenSignatures(AggregateTransaction transaction,
java.util.List<AggregateTransactionCosignature> cosignatures,
java.lang.String generationHash)
Sign transaction with cosignatures creating a new SignedTransaction.
|
SignedTransaction |
signTransactionWithCosignatories(AggregateTransaction transaction,
java.util.List<Account> cosignatories,
java.lang.String generationHash)
Sign transaction with cosignatories creating a new SignedTransaction.
|
public Account(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 static Account generateNewAccount(NetworkType networkType)
networkType - the network typepublic java.lang.String getPublicKey()
Stringpublic java.lang.String getPrivateKey()
Stringpublic KeyPair getKeyPair()
KeyPairpublic PublicAccount getPublicAccount()
PublicAccountpublic SignedTransaction sign(Transaction transaction, java.lang.String generationHash)
transaction - The transaction to be signed.generationHash - the generation hash.SignedTransactionpublic CosignatureSignedTransaction signCosignatureTransaction(CosignatureTransaction cosignatureTransaction)
cosignatureTransaction - The aggregate signature transaction.CosignatureSignedTransactionpublic CosignatureSignedTransaction signCosignatureTransaction(java.lang.String transactionHash)
transactionHash - The transaction hashCosignatureSignedTransactionpublic SignedTransaction signTransactionWithCosignatories(AggregateTransaction transaction, java.util.List<Account> cosignatories, java.lang.String generationHash)
transaction - The aggregate transaction to be signed.cosignatories - The list of accounts that will cosign the transactiongenerationHash - the generation hash.SignedTransactionpublic SignedTransaction signTransactionGivenSignatures(AggregateTransaction transaction, java.util.List<AggregateTransactionCosignature> cosignatures, java.lang.String generationHash)
transaction - The aggregate transaction to be signed.cosignatures - The list of precreated cosignaturesgenerationHash - the generation hash.SignedTransactionpublic NetworkType getNetworkType()