public class CalypsoFactory extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
CalypsoFactory.ConodeAddress |
| Constructor and Description |
|---|
CalypsoFactory() |
| Modifier and Type | Method and Description |
|---|---|
CalypsoFactory |
addConode(CalypsoFactory.ConodeAddress conode) |
CalypsoFactory |
addConode(URI conode,
String publicKey) |
CalypsoFactory |
addConodes(Collection<CalypsoFactory.ConodeAddress> conodes) |
CalypsoRPC |
createConnection() |
CalypsoRPC |
initialiseNewCalypso(Signer admin)
Create a new skipchain.
|
CalypsoFactory |
setGenesis(SkipblockId genesis)
Set chain genesis (getId/hash of the fist block in the chain)
|
CalypsoFactory |
setLTSId(LTSId ltsId)
Sets the LTSId to use for all write and read requests.
|
public CalypsoFactory setGenesis(SkipblockId genesis)
genesis - the skipblock ID of the genesis blockIllegalStateException - when genesis can not be decoded or is too shortpublic CalypsoFactory setLTSId(LTSId ltsId)
ltsId - the lts id to usepublic CalypsoFactory addConode(URI conode, String publicKey)
conode - cothority server address (base address in tcp://127.0.0.0:7001 form)publicKey - server public symmetricKey hex encoded to a stringIllegalArgumentException - when conode address is incorrectpublic CalypsoFactory addConode(CalypsoFactory.ConodeAddress conode)
conode - conode address with public keyIllegalArgumentException - when conode address is incorrectpublic CalypsoFactory addConodes(Collection<CalypsoFactory.ConodeAddress> conodes)
conodes - cothority server address with public keyIllegalArgumentException - when conode address is incorrectpublic CalypsoRPC createConnection() throws CothorityException
CothorityExceptionpublic CalypsoRPC initialiseNewCalypso(Signer admin) throws CothorityException
admin - the Signer who will be the adminCothorityException - if something goes wrongCopyright © 2018. All rights reserved.