Skip to main content

Assign one relayer in the sender's shard and issue a lease. Nothing is reserved yet.

POST 

/v1/relay/assign

Call it just before the user signs: the relayer address goes into the transaction, so the user signs once. renewFor renews the lease for a transaction that is already signed, so a slow signer does not have to sign again. cancel returns a lease for a cancel transaction, pinned to that nonce. Rate limits: 10/s per IP, and 2/s per sender with a burst of 10.

The caller must prove it controls the sender, in one of two ways:

  • a presence proof: the sender's own key signs the message corelayer/assign/v1|<chainId>|<sender>|<serverTimeMs>, where serverTimeMs is within +/- 30 000 ms of the server clock. The signature is a raw Ed25519 signature over the UTF-8 bytes of the message, without the MultiversX signed-message prefix that a wallet's signMessage adds. Set proof.kind to sponsor when a sponsor API key will pay for the relay, and to key otherwise. The sender's key signs both kinds;
  • a native-auth bearer token whose address equals sender.

This route does not read X-Api-Key, and a sponsor API key never proves presence: it goes on POST /v1/relay, where it selects the account that pays.

A missing proof gives 401 ASSIGN_PROOF_REQUIRED; a bad or stale one gives 401 ASSIGN_PROOF_INVALID. The prepare routes of the free purchase flow issue their own FREE lease and need no proof.

Request​

Responses​

Assignment.

Response Headers
    CoRelayer-Request-Id

    Request id, also the instance of a problem document and the log correlation id.