Options
All
  • Public
  • Public/Protected
  • All
Menu

Connector that expose functionalities to fetch garden data from subgraphs.

Hierarchy

  • GardenConnector

Implements

  • IGardenConnector

Index

Constructors

constructor

Properties

Private #gql

#gql: default

Methods

arbitratorFee

  • arbitratorFee(arbitratorFeeId: string): Promise<null | default>
  • Fetch the arbitrator fee of a proposal of the garden.

    Parameters

    • arbitratorFeeId: string

      The identifier of the arbitrator fee.

    Returns Promise<null | default>

    A promise that resolves to the arbitrator fee of a proposal.

collateralRequirement

  • collateralRequirement(proposalId: string): Promise<default>
  • Fetch the collateral requirement of a proposal of the garden.

    Parameters

    • proposalId: string

      The identifier of the proposal.

    Returns Promise<default>

    A promise that resolves to the collateral requirement of a proposal.

config

  • config(address: string): Promise<Config>
  • Fetch the configuration of the garden.

    Parameters

    • address: string

      The address of the garden to fetch.

    Returns Promise<Config>

    A promise that resolves to the configuratio of the garden.

disconnect

  • disconnect(): Promise<void>
  • Close the connection.

    Returns Promise<void>

onArbitratorFee

  • onArbitratorFee(arbitratorFeeId: string, callback: FunctionCallback): SubscriptionHandler
  • Subscribe to updates in the arbitrator fee of a proposal of the garden.

    Parameters

    • arbitratorFeeId: string

      The identifier of the arbitrator fee.

    • callback: FunctionCallback

      A function callback to postprocess the result.

    Returns SubscriptionHandler

    A GraphQL subsription to the arbitrator fee of a proposal.

onCollateralRequirement

  • onCollateralRequirement(proposalId: string, callback: FunctionCallback): SubscriptionHandler
  • Subscribe to updates in the collateral requirement of a proposal of the garden.

    Parameters

    • proposalId: string

      The identifier of the proposal.

    • callback: FunctionCallback

      A function callback to postprocess the result.

    Returns SubscriptionHandler

    A GraphQL subsription to the collateral requirement of a proposal.

onConfig

  • onConfig(address: string, callback: FunctionCallback): SubscriptionHandler
  • Subscribe to updates in the configuration of the garden.

    Parameters

    • address: string

      The address of the garden to subscribe.

    • callback: FunctionCallback

      A function callback to postprocess the result.

    Returns SubscriptionHandler

    A GraphQL subsription to the configuratio of the garden.

onProposal

  • onProposal(id: string, callback: FunctionCallback): SubscriptionHandler
  • Subscribe to updates in a proposal of the garden.

    Parameters

    • id: string

      The identifier of the proposal to subscribe.

    • callback: FunctionCallback

      A function callback to postprocess the result.

    Returns SubscriptionHandler

    A GraphQL subsription to a proposal of the garden.

onProposals

  • onProposals(garden: string, first: number, skip: number, orderBy: string, orderDirection: string, types: number[], statuses: number[], metadata: string, callback: FunctionCallback): SubscriptionHandler
  • Subscribe to updates of a list of proposals of the garden.

    Parameters

    • garden: string

      The address of the garden to subscribe.

    • first: number

      Number of entities to return.

    • skip: number

      Number of entities to skip.

    • orderBy: string

      Filter to order the results.

    • orderDirection: string

      Direction to order the results.

    • types: number[]

      Filter by proposal types.

    • statuses: number[]

      Filter by proposal statuses.

    • metadata: string

      Filter by proposal name.

    • callback: FunctionCallback

    Returns SubscriptionHandler

    A GraphQL subsription to a list of proposals of the garden.

onSupporter

  • onSupporter(id: string, callback: FunctionCallback): SubscriptionHandler
  • Subscribe to updates in a supporter of the garden.

    Parameters

    • id: string

      The identifier of the supporter to fetch.

    • callback: FunctionCallback

      A function callback to postprocess the result.

    Returns SubscriptionHandler

    A GraphQL subsription to a supporter of the garden.

proposal

  • Fetch a proposal of the garden.

    Parameters

    • id: string

      The identifier of the proposal to fetch.

    Returns Promise<Proposal>

    A promise that resolves to a proposal of the garden.

proposals

  • proposals(garden: string, first: number, skip: number, orderBy: string, orderDirection: string, types: number[], statuses: number[], metadata: string): Promise<Proposal[]>
  • Fetch a list of proposals of the garden.

    Parameters

    • garden: string

      The address of the garden to fetch.

    • first: number

      Number of entities to return.

    • skip: number

      Number of entities to skip.

    • orderBy: string

      Filter to order the results.

    • orderDirection: string

      Direction to order the results.

    • types: number[]

      Filter by proposal type.

    • statuses: number[]

      Filter by proposal status.

    • metadata: string

      Filter by proposal name.

    Returns Promise<Proposal[]>

    A promise that resolves to a list of proposals of the garden.

supporter

  • Fetch a supporter of the garden.

    Parameters

    • id: string

      The identifier of the supporter to fetch.

    Returns Promise<Supporter>

    A promise that resolves to a supporter of the garden.

Generated using TypeDoc