hydra

Mint a head invite. (admin access required)

Changed on

Provisions a node on a Hydra Host and signs its full public material with the given wallet, producing a code to hand a counterparty out of band. The node and its peer port are reserved from this moment and cannot be re-pointed, because --peer is fixed at boot — so an invite that is never redeemed must be revoked or left to expire. Redeeming it is what supplies the counterparty's material and lets the node start.

post/hydra/invite

Request

  • Base URL: ./../api/v1/ (relative, and the document was published on a file host, not at the API’s origin)
  • URL: ./../api/v1/hydra/invite
  • Auth: API key in header token

Request body

hotWalletIdstring required

Wallet that will identify us on the resulting head

ttlHoursinteger

How long the invite may sit before its reservation is released. Defaults to 168 (7 days).

autoFundboolean

Send the node's L1 fuel from the chosen wallet straight away. On unless set false, since a node cannot post Init, Commit, Close or Fanout without it. Opt out only if you fund that key yourself.

depositPeriodSecondsinteger

How long a deposit must settle before this head will take it — and, since this service always keeps hydra-node 2.4's deposit-activation equal to this same value, also how long before the deposit matures. Both nodes run the value signed here. A top-up is unusable until it matures, absorbable for one period after that, and cannot be recovered until two periods after it matures. Defaults to 600 on preprod and 1200 on mainnet: on mainnet the funds are real, so the wait is what rules out a rollback before they count on L2.

contestationPeriodSecondsinteger

How long after closing the head anyone may dispute the final state. Nobody can settle on chain until it elapses, so it is also the wait between closing a head and getting the funds back. Longer is the safe direction: it is the only protection against a counterparty closing on a stale state while your node is down, and settling can take several transactions. Defaults to 5 days on mainnet and 12 hours on preprod.

unsyncedPeriodSecondsinteger

How long a node may see no new block before it declares itself out of sync and refuses commands, rather than acting on a stale view of the chain. Defaults to 30 minutes on both networks, or half the dispute window where that is tighter. Half the window is the ceiling and may not be exceeded, which is checked against the resolved pair when the invite is minted rather than here, since either field may be defaulted. Raising it buys availability with the time a node needs to contest a close.

Example request

{}

Response

Invite minted

status'success' required

Example response

{
  "status": "success",
  "data": {}
}

Changes