Package com.h2tcoin.takamakachain.wallet
Class InstanceWalletKeyStoreBCED25519
- java.lang.Object
-
- com.h2tcoin.takamakachain.wallet.InstanceWalletKeyStoreBCED25519
-
- All Implemented Interfaces:
InstanceWalletKeystoreInterface
,Comparable<InstanceWalletKeystoreInterface>
public class InstanceWalletKeyStoreBCED25519 extends Object implements InstanceWalletKeystoreInterface
Current multithread implementation. Use this provider for signing.- Author:
- giovanni.antino@h2tcoin.com
-
-
Constructor Summary
Constructors Constructor Description InstanceWalletKeyStoreBCED25519(String walletName)
Initialize the wallet by creating both the list of words and the seed.InstanceWalletKeyStoreBCED25519(String walletName, int nCharForSeed)
Initialize the wallet by creating both the list of words and the seed.InstanceWalletKeyStoreBCED25519(String walletName, String password)
Initialize the wallet by creating both the list of words and the seed.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(InstanceWalletKeystoreInterface t)
String
getCurrentWalletID()
org.bouncycastle.crypto.AsymmetricCipherKeyPair
getKeyPairAtIndex(int i)
byte[]
getPublicKeyAtIndexByte(int i)
String
getPublicKeyAtIndexURL64(int i)
KeyContexts.WalletCypher
getWalletCypher()
-
-
-
Constructor Detail
-
InstanceWalletKeyStoreBCED25519
public InstanceWalletKeyStoreBCED25519(String walletName) throws UnlockWalletException
Initialize the wallet by creating both the list of words and the seed. Words:SeedGenerator.generateWords()
Seed:SeedGenerator.generateSeedPWH(java.util.List)
- Parameters:
walletName
-- Throws:
UnlockWalletException
-
InstanceWalletKeyStoreBCED25519
public InstanceWalletKeyStoreBCED25519(String walletName, String password) throws UnlockWalletException
Initialize the wallet by creating both the list of words and the seed. Words:SeedGenerator.generateWords()
Seed:SeedGenerator.generateSeedPWH(java.util.List)
- Parameters:
walletName
-password
-- Throws:
UnlockWalletException
-
InstanceWalletKeyStoreBCED25519
public InstanceWalletKeyStoreBCED25519(String walletName, int nCharForSeed) throws UnlockWalletException, WalletEmptySeedException, WalletBurnedException
Initialize the wallet by creating both the list of words and the seed. Words:SeedGenerator.generateWords()
Seed:SeedGenerator.generateSeedPWH(java.util.List)
- Parameters:
walletName
-nCharForSeed
-- Throws:
UnlockWalletException
WalletEmptySeedException
WalletBurnedException
-
-
Method Detail
-
getWalletCypher
public KeyContexts.WalletCypher getWalletCypher()
- Specified by:
getWalletCypher
in interfaceInstanceWalletKeystoreInterface
- Returns:
- the wallet cypher
-
getCurrentWalletID
public String getCurrentWalletID()
- Specified by:
getCurrentWalletID
in interfaceInstanceWalletKeystoreInterface
- Returns:
- the current wallet ID
-
getKeyPairAtIndex
public org.bouncycastle.crypto.AsymmetricCipherKeyPair getKeyPairAtIndex(int i) throws InvalidWalletIndexException
- Specified by:
getKeyPairAtIndex
in interfaceInstanceWalletKeystoreInterface
- Returns:
- the key pair public and private address related to the index
- Throws:
InvalidWalletIndexException
-
getPublicKeyAtIndexURL64
public String getPublicKeyAtIndexURL64(int i) throws InvalidWalletIndexException, PublicKeySerializzationException
- Specified by:
getPublicKeyAtIndexURL64
in interfaceInstanceWalletKeystoreInterface
- Returns:
- the public key as URL64 image String
- Throws:
InvalidWalletIndexException
PublicKeySerializzationException
-
getPublicKeyAtIndexByte
public byte[] getPublicKeyAtIndexByte(int i) throws InvalidWalletIndexException, PublicKeySerializzationException
- Specified by:
getPublicKeyAtIndexByte
in interfaceInstanceWalletKeystoreInterface
- Returns:
- the public key as byte array
- Throws:
InvalidWalletIndexException
PublicKeySerializzationException
-
compareTo
public int compareTo(InstanceWalletKeystoreInterface t)
- Specified by:
compareTo
in interfaceComparable<InstanceWalletKeystoreInterface>
-
-