public class WalletStorage extends Object
| Constructor and Description |
|---|
WalletStorage(WalletAccountDAO walletAccountDAO,
WalletPrivateKeyDAO privateKeyDAO,
WalletBlockchainStateDAO blockchainStateDAO,
org.exoplatform.web.security.codec.CodecInitializer codecInitializer) |
| Modifier and Type | Method and Description |
|---|---|
org.exoplatform.wallet.model.Wallet |
getWalletByAddress(String address,
String contractAddress) |
org.exoplatform.wallet.model.Wallet |
getWalletByIdentityId(long identityId,
String contractAddress) |
String |
getWalletPrivateKey(long walletId)
Find Wallet encoded private key by wallet identifier.
|
long |
getWalletsCount() |
Set<org.exoplatform.wallet.model.Wallet> |
listWallets()
Retrieves the list registered wallets
|
org.exoplatform.wallet.model.Wallet |
removeWallet(long identityId)
Removes a wallet identitied by user/space identity technical id
|
void |
removeWalletPrivateKey(long walletId)
Remove Wallet encoded private key by wallet identifier
|
void |
retrieveWalletBlockchainState(org.exoplatform.wallet.model.Wallet wallet,
String contractAddress)
Get wallet blockchain state from internal database
|
org.exoplatform.wallet.model.Wallet |
saveWallet(org.exoplatform.wallet.model.Wallet wallet,
boolean isNew) |
org.exoplatform.wallet.model.Wallet |
saveWalletBackupState(long identityId,
boolean backupState)
Change wallet backup state
|
void |
saveWalletBlockchainState(org.exoplatform.wallet.model.Wallet wallet,
String contractAddress)
Save wallet state in blockchain
|
void |
saveWalletPrivateKey(long walletId,
String content)
Save wallet private key
|
public WalletStorage(WalletAccountDAO walletAccountDAO, WalletPrivateKeyDAO privateKeyDAO, WalletBlockchainStateDAO blockchainStateDAO, org.exoplatform.web.security.codec.CodecInitializer codecInitializer)
public Set<org.exoplatform.wallet.model.Wallet> listWallets()
Set of Wallet details with associated addressespublic long getWalletsCount()
public org.exoplatform.wallet.model.Wallet getWalletByIdentityId(long identityId,
String contractAddress)
identityId - user/space technical identty idcontractAddress - contract address to use for wallet blockchain stateWallet details for identitypublic org.exoplatform.wallet.model.Wallet getWalletByAddress(String address, String contractAddress)
address - wallet addresscontractAddress - contract address to use for wallet blockchain stateWallet details identified by addresspublic void retrieveWalletBlockchainState(org.exoplatform.wallet.model.Wallet wallet,
String contractAddress)
wallet - object to refreshcontractAddress - contract address to use for wallet blockchain statepublic org.exoplatform.wallet.model.Wallet saveWallet(org.exoplatform.wallet.model.Wallet wallet,
boolean isNew)
wallet - wallet details to saveisNew - whether this is a new wallet association or notpublic org.exoplatform.wallet.model.Wallet saveWalletBackupState(long identityId,
boolean backupState)
identityId - user/space technical identty idbackupState - true if backedUp else falseWalletpublic org.exoplatform.wallet.model.Wallet removeWallet(long identityId)
identityId - user/space technical identty idWalletpublic String getWalletPrivateKey(long walletId)
walletId - wallet unique identifier that is equals to identity IDpublic void removeWalletPrivateKey(long walletId)
walletId - wallet unique identifier that is equals to identity IDpublic void saveWalletPrivateKey(long walletId,
String content)
walletId - wallet unique identifier that is equals to identity IDcontent - private key contentpublic void saveWalletBlockchainState(org.exoplatform.wallet.model.Wallet wallet,
String contractAddress)
wallet - wallet to save its statecontractAddress - address of the contract on which the state is
associatedCopyright © 2003–2021 eXo Platform SAS. All rights reserved.