Package com.syntifi.near.api.service
Class WalletService
- java.lang.Object
-
- com.syntifi.near.api.service.WalletService
-
public class WalletService extends java.lang.Object
Service methods to manipulate wallets- Since:
- 0.0.1
- Author:
- Alexandre Carvalho, Andre Bertolace
-
-
Constructor Summary
Constructors Constructor Description WalletService()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Wallet
loadWalletFromFile(java.io.File file)
Loads a wallet from filesystemstatic void
writeWalletToFile(java.io.File file, Wallet wallet)
Writes a wallet to filesystem
-
-
-
Method Detail
-
loadWalletFromFile
public static Wallet loadWalletFromFile(java.io.File file) throws java.io.IOException
Loads a wallet from filesystem- Parameters:
file
- the file to read from- Returns:
- a wallet with loaded content
- Throws:
java.io.IOException
- thrown if file not found or not a valid wallet json
-
writeWalletToFile
public static void writeWalletToFile(java.io.File file, Wallet wallet) throws java.io.IOException
Writes a wallet to filesystem- Parameters:
file
- the file to write towallet
- the wallet to persist- Throws:
java.io.IOException
- thrown if file could not be written
-
-