Class ReferralAPI

Represents a class for handling operations related to making analytics queries from the voidnode server.

Hierarchy

  • BaseAPI
    • ReferralAPI

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 claimRebate parameters into a transaction that can be broadcasted to the provider network.

    Parameters

    • tokens: string[]

      array of addresses of tokens 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 claimRebate operation.

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

    Parameters

    • tokens: string[]

      array of addresses of tokens to claim.

    • Optional provider: Provider

      The custom provider to use for this call.

    Returns TransactionData

    The encoded transaction data.

  • Returns a promise containing the array of tokens and amounts for referral fees.

    Parameters

    • referrer: string

      {string} The address of the referrer.

    • Optional provider: Provider

      The custom provider to use for this call.

    Returns Promise<[string[], bigint[]] & {
        rebates: bigint[];
        tokens: string[];
    }>

    Promise the array of tokens and amounts for referral fees.

Generated using TypeDoc