frostfs-sdk-java/client/src/main/java/info/FrostFS/sdk/tools/ClientEnvironment.java
Bruk Ori b0db7df192 [#1] add client environment
add client cut
code cleanup
Signed-off-by: Ori Bruk <o.bruk@yadro.com>
2024-07-24 15:49:12 +03:00

51 lines
1.3 KiB
Java

package info.FrostFS.sdk.tools;
import info.FrostFS.sdk.dto.OwnerId;
import info.FrostFS.sdk.dto.Version;
import info.FrostFS.sdk.services.FrostFSClient;
import io.grpc.Channel;
public class ClientEnvironment {
private final OwnerId ownerId;
private final Version version;
private final ECDsa key;
private final Channel channel;
private final FrostFSClient frostFSClient;
private NetworkSettings networkSettings;
public ClientEnvironment(String wif, Channel channel, Version version, FrostFSClient frostFSClient) {
this.key = new ECDsa(wif);
this.ownerId = OwnerId.fromKey(key.getPublicKeyByte());
this.version = version;
this.channel = channel;
this.frostFSClient = frostFSClient;
}
public Channel getChannel() {
return channel;
}
public NetworkSettings getNetworkSettings() {
return networkSettings;
}
public void setNetworkSettings(NetworkSettings networkSettings) {
this.networkSettings = networkSettings;
}
public FrostFSClient getFrostFSClient() {
return frostFSClient;
}
public OwnerId getOwnerId() {
return ownerId;
}
public Version getVersion() {
return version;
}
public ECDsa getKey() {
return key;
}
}