Reserve an EVM leg's funding, then report its broadcast

Call it WITHOUT txHash before the first transaction of an EVM leg you fund (approve or createSwap): it reserves the leg, and is refused with 409 while another funding of it is live — from any client or wallet. Call it again WITH txHash as soon as your createSwap is broadcast. While the reservation stands, every client shows the leg as on its way and its refund address is fixed. It is released when the escrow is recorded, or when the transaction reverts, mines without this swap's escrow, or is not seen on chain for 30 minutes; a reservation that never names a transaction lapses after 30 minutes. Pass at (the reservation's token) when attaching if more than one of your clients may fund. The same txHash again changes nothing.

post/v1/swaps/{id}/fund-intent

Request

  • Base URL: https://api.hashlock.markets
  • URL: https://api.hashlock.markets/v1/swaps/{id}/fund-intent
  • Auth: HTTP bearer

Path parameters

idstring required

Request body

leg'a' | 'b' required
txHashstring

0x + 64 hex — omit to reserve

fromstring

when reserving: the wallet that will send the escrow, recorded as the leg's refund address in the same write

atstring

when attaching: the reservation's token — meta.fundIntent[leg].at as the reserve returned it

Response

ok

Changes

No recorded changes to this operation across all 1 revision of this API.