All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.casper.sdk.model.key.BidAddr Maven / Gradle / Ivy

Go to download

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();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy