Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Reference — Core SDK: Disputes · Boson Protocol
Skip to content

Disputes mixin

Class: DisputesMixin

Source: packages/core-sdk/src/disputes/mixin.ts

Methods (13)

decideDispute, escalateDispute, expireDispute, expireDisputeBatch, expireEscalatedDispute, extendDisputeTimeout, getDisputeById, getDisputes, raiseDispute, refuseEscalatedDispute, resolveDispute, retractDispute, signDisputeResolutionProposal

Signatures

decideDispute (3 signatures)

Decides dispute by calling the DisputeHandlerContract.

public async decideDispute(
    exchangeId: BigNumberish,
    buyerPercent: BigNumberish,
    returnTxInfo: true
  ): Promise<TransactionRequest>
 
public async decideDispute(
    exchangeId: BigNumberish,
    buyerPercent: BigNumberish,
    returnTxInfo?: false | undefined
  ): Promise<TransactionResponse>
 
public async decideDispute(
    exchangeId: BigNumberish,
    buyerPercent: BigNumberish,
    returnTxInfo?: boolean
  ): Promise<TransactionResponse | TransactionRequest>

escalateDispute (3 signatures)

Escalates dispute by calling the DisputeHandlerContract.

public async escalateDispute(
    exchangeId: BigNumberish,
    returnTxInfo: true
  ): Promise<TransactionRequest>
 
public async escalateDispute(
    exchangeId: BigNumberish,
    returnTxInfo?: false | undefined
  ): Promise<TransactionResponse>
 
public async escalateDispute(
    exchangeId: BigNumberish,
    returnTxInfo?: boolean
  ): Promise<TransactionResponse | TransactionRequest>

expireDispute (3 signatures)

Expires a dispute by calling the DisputeHandlerContract.

public async expireDispute(
    exchangeId: BigNumberish,
    returnTxInfo: true
  ): Promise<TransactionRequest>
 
public async expireDispute(
    exchangeId: BigNumberish,
    returnTxInfo?: false | undefined
  ): Promise<TransactionResponse>
 
public async expireDispute(
    exchangeId: BigNumberish,
    returnTxInfo?: boolean
  ): Promise<TransactionResponse | TransactionRequest>

expireDisputeBatch (3 signatures)

Expires many disputes by calling the DisputeHandlerContract.

public async expireDisputeBatch(
    exchangeIds: BigNumberish[],
    returnTxInfo: true
  ): Promise<TransactionRequest>
 
public async expireDisputeBatch(
    exchangeIds: BigNumberish[],
    returnTxInfo?: false | undefined
  ): Promise<TransactionResponse>
 
public async expireDisputeBatch(
    exchangeIds: BigNumberish[],
    returnTxInfo?: boolean
  ): Promise<TransactionResponse | TransactionRequest>

expireEscalatedDispute (3 signatures)

Expires escalated dispute by calling the DisputeHandlerContract.

public async expireEscalatedDispute(
    exchangeId: BigNumberish,
    returnTxInfo: true
  ): Promise<TransactionRequest>
 
public async expireEscalatedDispute(
    exchangeId: BigNumberish,
    returnTxInfo?: false | undefined
  ): Promise<TransactionResponse>
 
public async expireEscalatedDispute(
    exchangeId: BigNumberish,
    returnTxInfo?: boolean
  ): Promise<TransactionResponse | TransactionRequest>

extendDisputeTimeout (3 signatures)

Extends the dispute timeout by calling the DisputeHandlerContract.

public async extendDisputeTimeout(
    exchangeId: BigNumberish,
    newDisputeTimeout: BigNumberish,
    returnTxInfo: true
  ): Promise<TransactionRequest>
 
public async extendDisputeTimeout(
    exchangeId: BigNumberish,
    newDisputeTimeout: BigNumberish,
    returnTxInfo?: false | undefined
  ): Promise<TransactionResponse>
 
public async extendDisputeTimeout(
    exchangeId: BigNumberish,
    newDisputeTimeout: BigNumberish,
    returnTxInfo?: boolean
  ): Promise<TransactionResponse | TransactionRequest>

getDisputeById (1 signature)

Returns dispute entity from subgraph.

public async getDisputeById(
    disputeId: BigNumberish,
    queryVars?: SingleDisputeQueryVariables
  )

getDisputes (1 signature)

Returns dispute entities from subgraph.

public async getDisputes(
    queryVars?: subgraph.GetDisputesQueryQueryVariables
  )

raiseDispute (3 signatures)

Raises a dispute by calling the DisputeHandlerContract.

public async raiseDispute(
    exchangeId: BigNumberish,
    returnTxInfo: true
  ): Promise<TransactionRequest>
 
public async raiseDispute(
    exchangeId: BigNumberish,
    returnTxInfo?: false | undefined
  ): Promise<TransactionResponse>
 
public async raiseDispute(
    exchangeId: BigNumberish,
    returnTxInfo?: boolean
  ): Promise<TransactionResponse | TransactionRequest>

refuseEscalatedDispute (3 signatures)

Refuses escalated dispute by calling the DisputeHandlerContract.

public async refuseEscalatedDispute(
    exchangeId: BigNumberish,
    returnTxInfo: true
  ): Promise<TransactionRequest>
 
public async refuseEscalatedDispute(
    exchangeId: BigNumberish,
    returnTxInfo?: false | undefined
  ): Promise<TransactionResponse>
 
public async refuseEscalatedDispute(
    exchangeId: BigNumberish,
    returnTxInfo?: boolean
  ): Promise<TransactionResponse | TransactionRequest>

resolveDispute (3 signatures)

Resolves dispute by calling the DisputeHandlerContract. If caller is buyer then signature of seller is required as an argument. If caller if seller then vice-versa. The signature can be retrieved by calling the method CoreSDK.signDisputeResolutionProposal. - args.exchangeId - ID of disputed exchange. - args.buyerPercent - Percentage of deposit the buyer gets. - args.sigR - r signature value of counterparty. - args.sigS - s signature value of counterparty. - args.sigV - v signature value of counterparty.

public async resolveDispute(
    args:
      | {
          exchangeId: BigNumberish;
          buyerPercentBasisPoints: BigNumberish;
          sigR: BytesLike;
          sigS: BytesLike;
          sigV: BigNumberish;
          returnTxInfo: true;
        }
      | {
          exchangeId: BigNumberish;
          buyerPercentBasisPoints: BigNumberish;
          signature: string;
          returnTxInfo: true;
        }
  ): Promise<TransactionRequest>
 
public async resolveDispute(
    args:
      | {
          exchangeId: BigNumberish;
          buyerPercentBasisPoints: BigNumberish;
          sigR: BytesLike;
          sigS: BytesLike;
          sigV: BigNumberish;
          returnTxInfo?: false | undefined;
        }
      | {
          exchangeId: BigNumberish;
          buyerPercentBasisPoints: BigNumberish;
          signature: string;
          returnTxInfo?: false | undefined;
        }
  ): Promise<TransactionResponse>
 
public async resolveDispute(
    args:
      | {
          exchangeId: BigNumberish;
          buyerPercentBasisPoints: BigNumberish;
          sigR: BytesLike;
          sigS: BytesLike;
          sigV: BigNumberish;
          returnTxInfo?: boolean;
        }
      | {
          exchangeId: BigNumberish;
          buyerPercentBasisPoints: BigNumberish;
          signature: string;
          returnTxInfo?: boolean;
        }
  ): Promise<TransactionResponse | TransactionRequest>

retractDispute (3 signatures)

Retracts a dispute by calling the DisputeHandlerContract.

public async retractDispute(
    exchangeId: BigNumberish,
    returnTxInfo: true
  ): Promise<TransactionRequest>
 
public async retractDispute(
    exchangeId: BigNumberish,
    returnTxInfo?: false | undefined
  ): Promise<TransactionResponse>
 
public async retractDispute(
    exchangeId: BigNumberish,
    returnTxInfo?: boolean
  ): Promise<TransactionResponse | TransactionRequest>

signDisputeResolutionProposal (3 signatures)

Signs dispute resolution message. - args.exchangeId - ID of disputed exchange. - args.buyerPercentBasisPoints - Percentage of deposit the buyer gets.

public async signDisputeResolutionProposal(args: {
    exchangeId: BigNumberish;
    buyerPercentBasisPoints: BigNumberish;
    returnTypedDataToSign: true;
  }): Promise<StructuredData>
 
public async signDisputeResolutionProposal(args: {
    exchangeId: BigNumberish;
    buyerPercentBasisPoints: BigNumberish;
    returnTypedDataToSign?: false;
  }): Promise<ReturnType<typeof getSignatureParameters>>
 
public async signDisputeResolutionProposal(args: {
    exchangeId: BigNumberish;
    buyerPercentBasisPoints: BigNumberish;
    returnTypedDataToSign?: boolean;
  }): Promise<StructuredData | ReturnType<typeof getSignatureParameters>>

Related