Skip to main content
GET
Returns structured data for funding an EVM-to-BTC swap via Permit2.

Path Parameters

id
string<uuid>
required

Swap ID

Response

Permit2 funding data

Response containing structured data for Permit2-based coordinator funding.

The SDK uses this to construct the EIP-712 Permit2 signature and executeAndCreateWithPermit2 calldata client-side. The signature's typed data, and which field here fills which slot of it, is documented on POST /swap/{id}/fund-gasless.

calls
object[]
required

The Call[] structs (approve DEX + DEX swap) — SDK encodes these

calls_hash
string
required

keccak256(abi.encode(calls)) — needed for the Permit2 witness

claim_address
string
required

Server's claim address

coordinator_address
string
required

HTLCCoordinator contract address

htlc_kind
string
required

The HTLC family (erc20 / native) and VERSION the swap locks on. From HTLCErc20 v7 / HTLCNative v2 the Permit2 witness binds refundAddress = depositor (the Permit2 signer); before that, the coordinator.

htlc_version
integer<int64>
required
Required range: x >= 0
lock_token_address
string
required

Lock token address (WBTC — output of the DEX swap)

permit2_address
string
required

Canonical Permit2 contract address

preimage_hash
string
required

SHA-256 preimage hash (0x-prefixed)

source_amount
string
required

Source amount in smallest units (decimal string). For a payout-pinned EVM → Lightning swap this is quoted afresh on every request and is the amount the Permit2 must cover.

source_token_address
string
required

Source token address (what the user holds, e.g. USDC)

timelock
integer<int64>
required

HTLC timelock (unix timestamp)

Required range: x >= 0
depositor_delegation
string | null

EIP-7702 delegation target of the depositor on the source chain, if its code is a delegation designator (0xef0100 || address); null when the depositor is a plain EOA. A sponsored claim delegates the SDK's address to Kernel V3.3, after which Permit2 and EIP-2612 verify signatures via ERC-1271 and the SDK must sign in Kernel's envelope. A delegation is per chain, so only the source chain's state is authoritative here.

Tri-state: the key is OMITTED when the code lookup failed (the SDK then falls back to its own probe), null is an authoritative "plain EOA", a string is the delegation target. Serde renders Some(None) as null and None as absent.

eip2612
null | object

EIP-2612 data for gasless approve (only present when gasless=true)

relay_fee
string | null

Relay fee in source token units (only present when gasless=true)