Escrow SDK
A class that lets you create and manage Kleros Escrow transactions.
npm i @kleros/componentsimport KlerosEscrow from "@kleros/components/kleros-escrow";
//...Methods
constructor
constructorParams (web3, archon)
(web3, archon)Name
Type
Description
Default
Returns (KlerosEscrow)
(KlerosEscrow)klerosEscrow.getAccount
klerosEscrow.getAccountReturns (Promise<object>)
(Promise<object>)klerosEscrow.setCourtAndCurrency
klerosEscrow.setCourtAndCurrencyParams (court = "blockchain-non-technical", currency)
(court = "blockchain-non-technical", currency)Name
Type
Description
Default
Returns (Promise)
(Promise)klerosEscrow.upload
klerosEscrow.uploadParams (fileName, bufferOrJSON)
(fileName, bufferOrJSON)Name
Type
Description
Default
Returns (Promise<string>)
(Promise<string>)klerosEscrow.getTransactions
klerosEscrow.getTransactionsParams (address)
(address)Name
Type
Description
Default
Returns (Promise<object[]>)
(Promise<object[]>)klerosEscrow.isSender
klerosEscrow.isSenderParams (transactionID)
(transactionID)Name
Type
Description
Default
Returns (Promise<boolean>)
(Promise<boolean>)klerosEscrow.createTransaction
klerosEscrow.createTransactionParams (amount, recipient, timeout, metaEvidence)
(amount, recipient, timeout, metaEvidence)Name
Type
Description
Default
Returns (Promise<object>)
(Promise<object>)klerosEscrow.pay
klerosEscrow.payParams (transactionID, amount)
(transactionID, amount)Name
Type
Description
Default
Returns (Promise<object>)
(Promise<object>)klerosEscrow.reimburse
klerosEscrow.reimburseParams (transactionID, amount)
(transactionID, amount)Name
Type
Description
Default
Returns (Promise<object>)
(Promise<object>)klerosEscrow.executeTransaction
klerosEscrow.executeTransactionParams (transactionID)
(transactionID)Name
Type
Description
Default
Returns (Promise<object>)
(Promise<object>)klerosEscrow.timeout
klerosEscrow.timeoutParams (transactionID)
(transactionID)Name
Type
Description
Default
Returns (Promise<object>)
(Promise<object>)klerosEscrow.payArbitrationFee
klerosEscrow.payArbitrationFeeParams (transactionID, amount)
(transactionID, amount)Name
Type
Description
Default
Returns (Promise<object>)
(Promise<object>)klerosEscrow.submitEvidence
klerosEscrow.submitEvidenceParams (transactionID, evidence)
(transactionID, evidence)Name
Type
Description
Default
Returns (Promise<object>)
(Promise<object>)Last updated