public class AccountBuilder extends AbstractBuilder<AccountBuilder,IotaAccount,AccountConfig> implements AccountSettings
AccountSettings must add the following:
generate() method to assignIotaDefaultConfig| Constructor and Description |
|---|
AccountBuilder(SeedProvider seed)
Start of the builder.
|
AccountBuilder(String seed)
Start of the builder.
|
| Modifier and Type | Method and Description |
|---|---|
AccountBuilder |
api(IotaAPI api) |
AccountBuilder |
clock(Clock clock) |
protected IotaAccount |
compile() |
AccountBuilder |
depth(int depth) |
AccountBuilder |
generate() |
IotaAPI |
getApi() |
int |
getDepth() |
int |
getMwm() |
List<Plugin> |
getPlugins() |
int |
getSecurityLevel() |
SeedProvider |
getSeed() |
AccountStore |
getStore()
The storage method we use for storing indexes and unsend transactions
|
Clock |
getTime() |
AccountBuilder |
mwm(int mwm) |
AccountBuilder |
plugin(Plugin plugin) |
AccountBuilder |
securityLevel(int securityLevel) |
AccountBuilder |
store(AccountStore store) |
build, config, config, config, getConfig, getConfigspublic AccountBuilder(String seed) throws ArgumentException
seed - The seed which we load the account forArgumentException - When an invalid seed is providedpublic AccountBuilder(SeedProvider seed)
seed - A custom seed provider for maintaining your seed securely elsewherepublic AccountBuilder mwm(int mwm)
public AccountBuilder depth(int depth)
public AccountBuilder securityLevel(int securityLevel)
public AccountBuilder store(AccountStore store)
public AccountBuilder api(IotaAPI api)
public AccountBuilder clock(Clock clock)
public AccountBuilder plugin(Plugin plugin)
public AccountBuilder generate() throws Exception
generate in class AbstractBuilder<AccountBuilder,IotaAccount,AccountConfig>Exceptionprotected IotaAccount compile()
compile in class AbstractBuilder<AccountBuilder,IotaAccount,AccountConfig>public SeedProvider getSeed()
getSeed in interface AccountBuilderSettingspublic IotaAPI getApi()
getApi in interface AccountBuilderSettingspublic int getMwm()
getMwm in interface AccountConfigpublic int getDepth()
getDepth in interface AccountConfigpublic int getSecurityLevel()
getSecurityLevel in interface AccountConfigpublic AccountStore getStore()
AccountConfiggetStore in interface AccountConfigpublic Clock getTime()
getTime in interface AccountBuilderSettingspublic List<Plugin> getPlugins()
getPlugins in interface AccountBuilderSettingsCopyright © 2019. All rights reserved.