public interface WalletAccountService
| Modifier and Type | Method and Description |
|---|---|
void |
checkCanSaveWallet(Wallet wallet,
Wallet storedWallet,
String currentUser)
Throws an exception if the user is not allowed to modify wallet information
|
void |
createAdminAccount(String privateKey,
String currentUser)
Creates admin account wallet in server side
|
void |
enableWalletByAddress(String address,
boolean enable,
String currentUser)
Enable/Disable User or Space wallet
|
Set<WalletAddressLabel> |
getAddressesLabelsVisibleBy(String currentUser)
List of labels that current user can access
|
String |
getAdminAccountPassword() |
String |
getPrivateKeyByTypeAndId(String type,
String remoteId)
Retrieve wallet private key by identity type and remoteId
|
String |
getPrivateKeyByTypeAndId(String type,
String remoteId,
String currentUser)
Retrieve wallet private key by identity type and remoteId
|
Wallet |
getWalletByAddress(String address)
Retrieve wallet by address
|
Wallet |
getWalletByAddress(String address,
String currentUser)
Retrieve wallet by address with blockchain state if current user can access
wallet data
|
Wallet |
getWalletByIdentityId(long identityId)
Retrieve wallet details by identity technical id
|
Wallet |
getWalletByTypeAndId(String type,
String remoteId)
Retrieve wallet details by identity type and remoteId
|
Wallet |
getWalletByTypeAndId(String type,
String remoteId,
String currentUser)
Retrieve wallet details by identity type and remoteId accessed by a user
|
long |
getWalletsCount()
Retrieve wallets count
|
boolean |
isWalletOwner(Wallet wallet,
String currentUser) |
Set<Wallet> |
listWallets()
Retrieves the list registered wallets
|
void |
refreshWalletFromBlockchain(Wallet wallet,
ContractDetail contractDetail,
Map<String,Set<String>> walletsModifications)
Refreshes wallet state from blockchain
|
void |
refreshWalletsFromBlockchain(Map<String,Set<String>> walletsModifications)
Refreshes wallets from blockchain
|
void |
removePrivateKeyByTypeAndId(String type,
String remoteId,
String currentUser)
Removes wallet private key by identity type and remoteId
|
void |
removeWalletByAddress(String address,
String currentUser)
Remove User or Space wallet address association
|
void |
removeWalletByTypeAndId(String type,
String remoteId,
String currentUser)
Remove wallet address association by type and remote id
|
void |
retrieveWalletBlockchainState(Wallet wallet)
Retrieve wallet state from internal database
|
WalletAddressLabel |
saveOrDeleteAddressLabel(WalletAddressLabel label,
String currentUser)
Saves label if label is not empty else, delete it
|
void |
savePrivateKeyByTypeAndId(String type,
String remoteId,
String content,
String currentUser)
Save wallet private key for a wallet identified by identity type and
remoteId
|
void |
saveWallet(Wallet wallet)
Save wallet to storage
|
void |
saveWalletAddress(Wallet wallet,
String currentUser,
boolean broadcast)
Save wallet address to currentUser or to a space managed by current user
|
Wallet |
saveWalletBackupState(String currentUser,
long identityId,
boolean backupState)
Change wallet backup state
|
void |
saveWalletBlockchainState(Wallet wallet,
String contractAddress)
Save wallet state on blockchain
|
void |
setInitializationStatus(String address,
WalletInitializationState initializationState)
Change wallet initialization status
|
void |
setInitializationStatus(String address,
WalletInitializationState initializationState,
String currentUserId)
Change wallet initialization status
|
Set<Wallet> listWallets()
long getWalletsCount()
Wallet getWalletByIdentityId(long identityId)
identityId - User/Space identity technical idWallet wallet details identified by identity technical idWallet getWalletByTypeAndId(String type, String remoteId, String currentUser)
type - 'user' or 'space'remoteId - username or space pretty namecurrentUser - current username saving wallet private keyWallet wallet details identified by type and remote IdWallet getWalletByTypeAndId(String type, String remoteId)
type - 'user' or 'space'remoteId - username or space pretty nameWallet wallet details identified by type and remote Idvoid savePrivateKeyByTypeAndId(String type, String remoteId, String content, String currentUser) throws IllegalAccessException
type - 'user' or 'space'remoteId - username or space pretty namecontent - crypted private keycurrentUser - current usernameIllegalAccessException - when the current user is not allowed to save
the encrypted private key of walletString getPrivateKeyByTypeAndId(String type, String remoteId, String currentUser) throws IllegalAccessException
type - 'user' or 'space'remoteId - username or space pretty namecurrentUser - current username getting wallet private keyIllegalAccessException - when the current user is not allowed to get
the encrypted private key of walletString getPrivateKeyByTypeAndId(String type, String remoteId)
type - 'user' or 'space'remoteId - username or space pretty namevoid removePrivateKeyByTypeAndId(String type, String remoteId, String currentUser) throws IllegalAccessException
type - 'user' or 'space'remoteId - username or space pretty namecurrentUser - current username removing wallet private keyIllegalAccessException - when the current user is not an owner of
walletWallet getWalletByAddress(String address, String currentUser)
address - address of wallet to retrievecurrentUser - current username accessing wallet informationWallet wallet details identified by type and remote IdWallet getWalletByAddress(String address)
address - address of wallet to retrieveWallet wallet details identified by type and remote Idvoid saveWallet(Wallet wallet)
wallet - wallet to savevoid saveWalletBlockchainState(Wallet wallet, String contractAddress)
wallet - contractAddress - Wallet saveWalletBackupState(String currentUser, long identityId, boolean backupState) throws IllegalAccessException
identityId - user/space technical identty idbackupState - true if backedUp else falsecurrentUser - current username saving wallet backup stateWalletIllegalAccessException - when currentUser is not owner of walletvoid saveWalletAddress(Wallet wallet, String currentUser, boolean broadcast) throws IllegalAccessException
wallet - Wallet wallet details to savecurrentUser - current username saving wallet detailsbroadcast - broadcast saving event or notIllegalAccessException - when the current user is not able to save a
new address to the walletvoid removeWalletByAddress(String address, String currentUser) throws IllegalAccessException
address - wallet address association to removecurrentUser - current username removing wallet detailsIllegalAccessException - if current user is not an administratorvoid removeWalletByTypeAndId(String type, String remoteId, String currentUser) throws IllegalAccessException
type - USER/SPACE/ADMIN, see WalletTyperemoteId - username or space pretty namecurrentUser - current username saving wallet detailsIllegalAccessExceptionvoid enableWalletByAddress(String address, boolean enable, String currentUser) throws IllegalAccessException
address - address of wallet to enable/disableenable - whether enable or disable walletcurrentUser - username of current user making the operationIllegalAccessException - if current user is not an administratorvoid checkCanSaveWallet(Wallet wallet, Wallet storedWallet, String currentUser) throws IllegalAccessException
wallet - wallet details to savestoredWallet - stored wallet in databasecurrentUser - current username that is making the modificationIllegalAccessException - if current user is not allowed to modify
walletboolean isWalletOwner(Wallet wallet, String currentUser)
wallet - currentUser - WalletAddressLabel saveOrDeleteAddressLabel(WalletAddressLabel label, String currentUser)
label - label details object to processcurrentUser - current user making the label
creation/modification/deletionWalletAddressLabel saved or deleted label detailsSet<WalletAddressLabel> getAddressesLabelsVisibleBy(String currentUser)
currentUser - current username accessing the list of addresses labelsSet of label detailsvoid setInitializationStatus(String address, WalletInitializationState initializationState, String currentUserId) throws IllegalAccessException
address - wallet addressinitializationState - wallet initialization status of type
WalletInitializationStatecurrentUserId - user changing wallet statusIllegalAccessException - if current user is not allowed to modify
wallet initialization statusvoid setInitializationStatus(String address, WalletInitializationState initializationState)
address - wallet addressinitializationState - wallet initialization status of type
WalletInitializationStatevoid createAdminAccount(String privateKey, String currentUser) throws IllegalAccessException
privateKey - admin account wallet private keycurrentUser - current user creating walletIllegalAccessException - if current user is not allowed to create
admin wallet accountString getAdminAccountPassword()
void refreshWalletsFromBlockchain(Map<String,Set<String>> walletsModifications)
walletsModifications - modified wallets on blockchain with the set of
invoked methods on contractvoid refreshWalletFromBlockchain(Wallet wallet, ContractDetail contractDetail, Map<String,Set<String>> walletsModifications)
wallet - contractDetail - walletsModifications - void retrieveWalletBlockchainState(Wallet wallet)
wallet - object to refreshCopyright © 2003–2019 eXo Platform SAS. All rights reserved.