51 lines
1.3 KiB
Java
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;
|
|
}
|
|
}
|