Function parseToOptionTypeV2

  • Parses option type from Anchor, decoded as an object into an enum.

    Throws

    If the option type is not supported.

    Example

    // returns OptionTypeV2.PUT
    parseOptionType({ put: {} });

    Parameters

    • type: {
          call?: Object;
          put?: Object;
      }

      The object representing the option type to parse.

      • Optional call?: Object
      • Optional put?: Object

    Returns OptionTypeV2

    The parsed option type.

Generated using TypeDoc