ErasureEscrow

ErasureEscrow

new ErasureEscrow(config)

Parameters:
Name Type Description
config Object
Properties
Name Type Description
buyer string
seller string
proofhash string
stakeAmount string
paymentAmount string
escrowAddress string
web3Provider Object
protocolVersion string

Methods

(static) contract() → {Object}

Access the web3 contract class
Returns:
contract object
Type
Object

(static) address() → {address}

Get the address of this escrow
Returns:
address of the escrow
Type
address

(static) seller() → {address}

Get the address of the seller of this escrow
Returns:
address of the seller
Type
address

(static) buyer() → {address}

Get the address of the buyer of this escrow
Returns:
address of the buyer
Type
address

(static) depositStake() → {Promise|Promise}

Called by seller to deposit the stake - If the payment is already deposited, also send the encrypted symkey
Returns:
  • address of the agreement
    Type
    Promise
  • transaction receipt
    Type
    Promise

(static) depositPayment() → {Promise}

Called by buyer to deposit the payment
Returns:
transaction receipt
Type
Promise

(static) finalize() → {Promise|Promise}

Called by seller to finalize and submit the encrypted symkey
Returns:
  • address of the agreement
    Type
    Promise
  • transaction receipts
    Type
    Promise

(static) cancel() → {Promise}

Called by seller or buyer to attempt to cancel the escrow
Returns:
transaction receipt
Type
Promise