Interface: IEscrowData
Full information about the escrow
Example
// A returned object might look e.g. like this:
{
challengePeriod: 1209600,
challengePeriodStart: "2023-01-24T11:54:33.000Z",
challengePeriodEnd: "2023-02-07T11:54:33.000Z",
status: {
state: "Paid",
latestChallengeBy: null,
latestSettlementOfferBy: null,
claimed: false
},
escrowId: 434,
amount: "2500000000",
marketplace: "0xf8C03F09b4f53FDc05b57c7846da5F428798f187",
buyer: "0x1cB9dc49C0cC09D72E8dA74a9Ea956A0b1A65ab4",
seller: "0xA98135151f8dCd5632A63CC6358f5684c62B041D",
splitMarketplace: 10,
splitBuyer: 0,
splitSeller: 100,
splitProtocol: 0.69,
consensusBuyer: 0,
consensusSeller: 1,
arbitration: {
arbitrator: "0x3C86F543e64810E1d843809B2b70a4FDcC3b9B66",
consensusSeller: true,
consensusBuyer: true,
arbitrated: false,
arbitratorFee: 0
},
settlement: null,
paymentReference: "custom payment reference",
token: {
address: "0x7eD124F79447a1390281c88bB9bca2AC4F009BBE"
}
}
Hierarchy
-
IEscrowData
Properties
amount
• amount: bigint
Amount in token's (or ETH's) wei unit
Defined in
buyer
• buyer: string
Buyer (payer) address
Defined in
chainId
• Optional
chainId: number
Network's chain ID (returned only from the indexer)
Defined in
challengePeriod
• challengePeriod: number
How much a challenge period will extend by if challenged
Defined in
challengePeriodEnd
• challengePeriodEnd: Date
Current challenge period end (when it will be possible to claim the payment)
Defined in
challengePeriodStart
• challengePeriodStart: Date
Current challenge period start (either payment time or the latest challenge)
Defined in
consensusBuyer
• consensusBuyer: number
Indicates status of the payment from buyer's and seller's side. Negative value means that party was challenged.
Examples for various states:
0, 1: Paid - If the payment is claimed after challenge period ends, consensus remains like this
1, 1: Released by buyer
1,-1: 1x Challenged by buyer - If the payment is claimed after CP ends, consensus remains like this
-1, 2: 1x Challenged by buyer and 1x by Seller
2,-2: 2x Challenged by buyer, 1x by seller
3, 2: Released, Refunded, or Settled. Deduct 1 from each consensus number to calculate number of challenges
Defined in
consensusSeller
• consensusSeller: number
See consensusBuyer for details
Defined in
createdAt
• Optional
createdAt: Date
When was the payment sent to the escrow
Defined in
ensAddresses
• Optional
ensAddresses: IEnsAddresses
ENS Addresses
Defined in
escrowId
• escrowId: number
ID of the escrow that the transaction created or acted upon
Defined in
latestSettlementOfferAddress
• Optional
latestSettlementOfferAddress: string
Address that sent the latest settlement offer (if any)
Defined in
latestSettlementOfferBuyer
• Optional
latestSettlementOfferBuyer: number
What was the proposed seller's split in the latest settlement offer
Defined in
latestSettlementOfferSeller
• Optional
latestSettlementOfferSeller: number
What was the proposed seller's split in the latest settlement offer
Defined in
marketplace
• marketplace: string
Marketplace address
Defined in
paymentReference
• paymentReference: string
Payment reference, e.g. order ID or information for an arbitrator
Defined in
seller
• seller: string
Seller (payee) address
Defined in
splitBuyer
• splitBuyer: number
How much (%) of the payment is meant for the buyer (default 0)
Defined in
splitMarketplace
• splitMarketplace: number
Marketplace fee (%)
Defined in
splitProtocol
• splitProtocol: number
Protocol fee (%)
Defined in
splitSeller
• splitSeller: number
How much (%) of the payment is meant for the seller (default 100). Buyer and seller splits are "gross", i.e. before fee deduction. They are recalculated at the time of the claim based on fee and the latest status of the escrow
Defined in
status
• status: IEscrowStatus
Indicates status of the payment (claimed, latestChallengeBy, latestSettlementBy and its escrow state like 'Paid' | 'Unpaid' etc.)
Defined in
token
• token: IToken
Information about the payment token