Class PremiaVoidnodeAlpha

The PremiaVoidnode class is the entry point for interacting with the Premia V3 voidnode server to query on-chain and indexed data using various APIs and services.

Hierarchy

  • PremiaVoidnode

Constructors

Properties

client: ApolloClient<NormalizedCacheObject>

The apollo voidnode client used to fetch data from the Premia voidnode server.

Default Value

ApolloClient

queryParams?: QueryParams

The voidnode-specific parameters to be used for upcoming voidnode queries.

Default Value

{} (empty object)

uri: string

The voidnode URL to use for fetching indexed contract data.

Methods

  • Parameters

    Returns {
        base: string;
        priceOracleAddress: string;
        quote: string;
    }

    • base: string
    • priceOracleAddress: string
    • quote: string
  • Parses a token input to return a token address string.

    Parameters

    • token: TokenOrAddress

      The token input which can be either a Token object or a string representing the address.

    Returns string

    • The token address as a string.
  • Parameters

    • search: string
    • orderBy: string = 'timestamp'
    • order: string = 'ASC'
    • limit: number = 100
    • skip: number = 0
    • Optional account: string
    • Optional startTime: number
    • Optional endTime: number
    • Optional searchInput: string

    Returns Promise<OptionPSTransaction[]>

  • Parameters

    • pair: TokenPairOrId
    • Optional options: {
          isExpired?: boolean;
          maturity?: BigNumberish;
          strike?: BigNumberish;
      }
      • Optional isExpired?: boolean
      • Optional maturity?: BigNumberish
      • Optional strike?: BigNumberish

    Returns Promise<PoolExtended[]>

  • Parameters

    • filter: string
    • search: string
    • orderBy: string = 'timestamp'
    • order: string = 'ASC'
    • limit: number = 100
    • skip: number = 0
    • Optional type: string
    • Optional poolAddress: string
    • Optional account: string
    • Optional startTime: number
    • Optional endTime: number
    • Optional searchInput: string

    Returns Promise<Transaction[]>

  • Parameters

    • address: string
    • startTime: BigNumberish
    • endTime: BigNumberish
    • orderBy: string = 'timestamp'
    • order: string = 'ASC'
    • limit: number = 100
    • skip: number = 0

    Returns Promise<UserSnapshot[]>

  • Parameters

    • user: string
    • timestampFrom: number
    • timestampTo: number
    • limit: number = 100
    • skip: number = 0

    Returns Promise<VaultVote[]>

  • Parameters

    • filter: string
    • search: string
    • orderBy: string = 'timestamp'
    • order: string = 'ASC'
    • limit: number = 100
    • skip: number = 0
    • Optional type: string
    • Optional vaultAddress: string
    • Optional account: string
    • Optional startTime: number
    • Optional endTime: number
    • Optional searchInput: string

    Returns Promise<VaultTransaction[]>

Generated using TypeDoc