Skip to main content

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

Properties

amount

amount: bigint

Amount in token's (or ETH's) wei unit

Defined in

typing/index.ts:138


buyer

buyer: string

Buyer (payer) address

Defined in

typing/index.ts:149


challengePeriod

challengePeriod: number

How much a challenge period will extend by if challenged

Defined in

typing/index.ts:159


challengePeriodEnd

challengePeriodEnd: Date

Current challenge period end (when it will be possible to claim the payment)

Defined in

typing/index.ts:163


challengePeriodStart

challengePeriodStart: Date

Current challenge period start (either payment time or the latest challenge)

Defined in

typing/index.ts:161


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

typing/index.ts:190


consensusSeller

consensusSeller: number

See consensusBuyer for details

Defined in

typing/index.ts:193


createdAt

Optional createdAt: Date

When was the payment sent to the escrow

Defined in

typing/index.ts:196


ensAddresses

Optional ensAddresses: IEnsAddresses

ENS Addresses

Defined in

typing/index.ts:206


escrowId

escrowId: number

ID of the escrow that the transaction created or acted upon

Defined in

typing/index.ts:141


latestSettlementOfferAddress

Optional latestSettlementOfferAddress: string

Address that sent the latest settlement offer (if any)

Defined in

typing/index.ts:199


latestSettlementOfferBuyer

Optional latestSettlementOfferBuyer: number

What was the proposed seller's split in the latest settlement offer

Defined in

typing/index.ts:203


latestSettlementOfferSeller

Optional latestSettlementOfferSeller: number

What was the proposed seller's split in the latest settlement offer

Defined in

typing/index.ts:201


marketplace

marketplace: string

Marketplace address

Defined in

typing/index.ts:147


paymentReference

paymentReference: string

Payment reference, e.g. order ID or information for an arbitrator

Defined in

typing/index.ts:156


seller

seller: string

Seller (payee) address

Defined in

typing/index.ts:151


splitBuyer

splitBuyer: number

How much (%) of the payment is meant for the buyer (default 0)

Defined in

typing/index.ts:166


splitMarketplace

splitMarketplace: number

Marketplace fee (%)

Defined in

typing/index.ts:176


splitProtocol

splitProtocol: number

Protocol fee (%)

Defined in

typing/index.ts:174


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

typing/index.ts:172


status

status: IEscrowStatus

Indicates status of the payment (claimed, latestChallengeBy, latestSettlementBy and its escrow state like 'Paid' | 'Unpaid' etc.)

Defined in

typing/index.ts:144


token

token: IToken

Information about the payment token

Defined in

typing/index.ts:153