com.casper.sdk.model.key.BidAddr Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of casper-java-sdk Show documentation
Show all versions of casper-java-sdk Show documentation
SDK to streamline the 3rd party Java client integration processes. Such 3rd parties include exchanges & app developers.
The newest version!
package com.casper.sdk.model.key;
import com.casper.sdk.exception.NoSuchKeyTagException;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* Bid Address
*
* @author [email protected]
*/
@AllArgsConstructor
@Getter
public enum BidAddr {
/// Unified BidAddr.
UNIFIED((byte) 0),
/// Validator BidAddr.
VALIDATOR((byte) 1),
/// Delegator BidAddr.
DELEGATOR((byte) 2),
/// Validator credit BidAddr.
CREDIT((byte) 4);
private final byte byteTag;
public static BidAddr getByTag(final byte tag) throws NoSuchKeyTagException {
for (BidAddr a : values()) {
if (a.byteTag == tag)
return a;
}
throw new NoSuchKeyTagException();
}
}