Represents the type of option in the Valorem Clear system.

Hierarchy (view full)

Constructors

Properties

exerciseAsset: SupportedAsset
optionInfo: OptionTypeInfo
optionTypeId: bigint
tokenId: undefined | bigint = undefined
tokenType: undefined | 0 | 2 | 1 = undefined
typeExists: boolean
underlyingAsset: SupportedAsset

Accessors

Methods

  • Creates a new option type on-chain using the trader instance.

    Parameters

    • trader: Trader

      Trader instance to execute the transaction.

    Returns Promise<void>

  • Generates a unique option type ID based on the provided option type information.

    Parameters

    Returns bigint

    The generated option type ID.

  • Retrieves the option type information from the clearinghouse contract.

    Parameters

    • tokenId: bigint

      The unique identifier of the option or claim.

    • clearinghouse: ClearinghouseContract

      The clearinghouse contract instance.

    Returns Promise<{
        exerciseAmount: bigint;
        exerciseAsset: `0x${string}`;
        exerciseTimestamp: number;
        expiryTimestamp: number;
        nextClaimKey: bigint;
        settlementSeed: bigint;
        underlyingAmount: bigint;
        underlyingAsset: `0x${string}`;
    }>

    The option type information.

  • Determines the token type for the given ID by querying the clearinghouse.

    Parameters

    • tokenId: bigint

      The unique identifier of the option or claim.

    • clearinghouse: ClearinghouseContract

      The clearinghouse contract instance.

    Returns Promise<0 | 2 | 1>

    The token type as a promise that resolves to 0, 1, or 2.

Generated using TypeDoc