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

org.xrpl.xrpl4j.codec.binary.definitions.Definitions Maven / Gradle / Ivy

There is a newer version: 3.0.0-rc2.1
Show newest version
package org.xrpl.xrpl4j.codec.binary.definitions;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.immutables.value.Value.Immutable;

import java.util.List;
import java.util.Map;

/**
 * Type to represent a the top-level object in definitions.json file.
 */
@Immutable
@JsonSerialize(as = ImmutableDefinitions.class)
@JsonDeserialize(as = ImmutableDefinitions.class)
public interface Definitions {

  /**
   * Type definitions map (type name to ordinal value).
   *
   * @return A {@link Map} of types.
   */
  @JsonProperty("TYPES")
  Map types();

  /**
   * Fields definitions list.
   *
   * @return {@link List} of type {@link List} of type {@link JsonNode} containing all field definitions.
   */
  @JsonProperty("FIELDS")
  List> fields();

  /**
   * Ledger types mappings (transaction type to ordinal value).
   *
   * @return {@link Map} keyed by {@link String} with {@link Integer} values for all ledger entry types.
   */
  @JsonProperty("LEDGER_ENTRY_TYPES")
  Map ledgerEntryTypes();

  /**
   * Transaction types mappings (transaction type to ordinal value).
   *
   * @return {@link Map} keyed by {@link String} with {@link Integer} values for all transaction types.
   */
  @JsonProperty("TRANSACTION_TYPES")
  Map transactionTypes();

  /**
   * Transaction results mappings (transaction result to ordinal value).
   *
   * @return {@link Map} keyed by {@link String} with {@link Integer} values for all transaction results.
   */
  @JsonProperty("TRANSACTION_RESULTS")
  Map transactionResults();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy