Class MiningAPI

Represents a class for handling operations related to making liquidity mining.

Hierarchy

  • BaseAPI
    • MiningAPI

Constructors

Properties

premia: Premia

The Premia SDK instance.

streamIndex: number = 0

The current index of quote streams. Used to cancel stale streams.

Methods

  • Cancels all ongoing streams.

    Returns Promise<void>

  • Encodes the claim parameters into a transaction that can be broadcasted to the provider network.

    Parameters

    • vaults: string[]

      array of addresses of vaults to claim partial amount.

    • amount: BigNumberish

      amount of rewards to claim.

    • Optional provider: Provider

      The custom provider to use for this call.

    Returns Promise<ContractTransaction>

    A promise that resolves to a contract transaction for the claim operation.

  • Encodes the claimAll parameters into a transaction that can be broadcasted to the provider network.

    Parameters

    • vaults: string[]

      array of addresses of vaults to claim all rewards.

    • Optional provider: Provider

      The custom provider to use for this call.

    Returns Promise<ContractTransaction>

    A promise that resolves to a contract transaction for the claimAll operation.

  • Encodes the claimAll parameters into a transaction that can be broadcasted to the provider network.

    Parameters

    • vaults: string[]

      array of addresses of vaults to claim all rewards.

    • Optional provider: Provider

      The custom provider to use for this call.

    Returns TransactionData

    The encoded transaction data.

  • Encodes the claim parameters into a transaction that can be broadcasted to the provider network.

    Parameters

    • vaults: string[]

      array of addresses of vaults to claim partial amount.

    • amount: BigNumberish

      amount of rewards to claim.

    • Optional provider: Provider

      The custom provider to use for this call.

    Returns TransactionData

    The encoded transaction data.

  • Returns a promise containing amount of user rewards.

    Parameters

    • __namedParameters: {
          user: string;
          vault: string;
      }
      • user: string
      • vault: string
    • Optional provider: Provider

      The custom provider to use for this call.

    Returns Promise<bigint>

    Promise amount of pending dual mining rewards.

  • Returns a promise containing the amount of pending user rewards for a vault.

    Parameters

    • __namedParameters: {
          user: string;
          vault: string;
      }
      • user: string
      • vault: string
    • Optional provider: Provider

      The custom provider to use for this call.

    Returns Promise<bigint>

    Promise the amount of pending user rewards for a vault.

  • Returns the total number of rewards across all targets for the next year.

    Parameters

    • Optional provider: Provider

      The custom provider to use for this call.

    Returns Promise<bigint>

    A promise that resolves to the total number of rewards across all targets for the next year.

  • Returns a promise containing total amount of pending user rewards.

    Parameters

    • user: {
          user: string;
      }

      The address of the user.

      • user: string
    • Optional provider: Provider

      The custom provider to use for this call.

    Returns Promise<bigint>

    Promise total amount of pending user rewards.

  • Returns the total number of votes across all targets (vaults).

    Parameters

    • Optional provider: Provider

      The custom provider to use for this call.

    Returns Promise<bigint>

    A promise that resolves to the total number of votes across all targets (vaults).

  • Returns the UserInfo including the votes of the specified user in the vault.

    Parameters

    • user: string

      The address of the user.

    • vaultAddress: string

      The address of the vault.

    • Optional provider: Provider

      The custom provider to use for this call.

    Returns Promise<IVaultMining.UserInfoStructOutput>

    A promise that resolves to the UserInfo including the votes of the specified user in the vault.

  • Returns a promise containing amount of user rewards.

    Parameters

    • user: {
          user: string;
      }

      The address of the user.

      • user: string
    • Optional provider: Provider

      The custom provider to use for this call.

    Returns Promise<bigint>

    Promise amount of user rewards.

  • Returns the VaultInfo including the number of votes for the specified vault.

    Parameters

    • vaultAddress: string

      The address of the vault.

    • Optional provider: Provider

      The custom provider to use for this call.

    Returns Promise<VaultInfoStructOutput>

    A promise that resolves to the VaultInfo including the number of votes for the specified vault.

  • Returns a promise containing vote multipler for a vault.

    Parameters

    • vault: {
          vault: string;
      }

      The address of the vault.

      • vault: string
    • Optional provider: Provider

      The custom provider to use for this call.

    Returns Promise<bigint>

    Promise vote multiplier for a vault.

  • Returns strike and maturity before claiming premia option rewards.

    Parameters

    • Optional provider: Provider

      The custom provider to use for this call.

    Returns Promise<[bigint, bigint] & {
        maturity: bigint;
        strike: bigint;
    }>

    A promise that resolves to the strike and maturity for premia option rewards.

Generated using TypeDoc