Constructors

Methods

  • Add a proposal for an agent.

    Parameters

    • agentAddress: string

      The address of the agent.

    • serviceName: string

      The name of the service.

    • servicePrice: number

      The price of the service.

    Returns Promise<boolean>

    A promise that resolves to a boolean indicating if the proposal was added.

  • Gets the address of the signer.

    Returns Promise<string>

    A promise that resolves to the signer address.

  • Gets data for a specific agent.

    Parameters

    • agentAddress: string

      The address of the agent.

    Returns Promise<AgentData>

    A promise that resolves to the agent data.

  • The reputation of an agent.

    Parameters

    • agentAddress: string

      The address of the agent

    Returns Promise<bigint>

    A promise that resolves to the reputation of the agent.

  • Registers a new agent.

    Parameters

    • address: string

      The address of the agent..

    • metadata: AgentMetadata

      The metadata of the agent.

    • serviceName: string

      The name of the service.

    • servicePrice: number

      The price of the service.

    Returns Promise<boolean>

    A promise that resolves to the agent address.

  • Remove the proposal of an agent.

    Parameters

    • agentAddress: string

      The address of the agent.

    • proposalId: string

      The ID of the proposal.

    Returns Promise<boolean>

    A promise that resolves to a boolean indicating if the proposal was removed.