Skip to main content

PreparedPurchase

transaction objectrequired

Transaction built by a prepare endpoint. The wallet adds only the signature(s). Read nonce back from the signed transaction, because some wallets raise it to the account's current nonce.

nonceinteger<int64>required
valuestringrequired
receiverAddressrequired

MultiversX bech32 address.

Possible values: Value must match regular expression ^erd1[02-9ac-hj-np-z]{58}$

Example: erd1mf4u0jr6786wtz7s7dj6gmpyfafg8e0exh5wvye5cygvvxyyxhpsmj8q0e
senderAddressrequired

MultiversX bech32 address.

Possible values: Value must match regular expression ^erd1[02-9ac-hj-np-z]{58}$

Example: erd1mf4u0jr6786wtz7s7dj6gmpyfafg8e0exh5wvye5cygvvxyyxhpsmj8q0e
gasPriceinteger<int64>required
gasLimitinteger<int64>required
datastring

base64

chainIDstringrequired
versionintegerrequired
optionsinteger
guardianAddress

MultiversX bech32 address.

Possible values: Value must match regular expression ^erd1[02-9ac-hj-np-z]{58}$

Example: erd1mf4u0jr6786wtz7s7dj6gmpyfafg8e0exh5wvye5cygvvxyyxhpsmj8q0e
relayerAddress

MultiversX bech32 address.

Possible values: Value must match regular expression ^erd1[02-9ac-hj-np-z]{58}$

Example: erd1mf4u0jr6786wtz7s7dj6gmpyfafg8e0exh5wvye5cygvvxyyxhpsmj8q0e
assignment object

Absent when gasless=false.

assignmentIdstringrequired

The ID of this assignment, as 24 lowercase hex characters.

Possible values: Value must match regular expression ^[0-9a-f]{24}$

relayerAddressrequired

MultiversX bech32 address.

Possible values: Value must match regular expression ^erd1[02-9ac-hj-np-z]{58}$

Example: erd1mf4u0jr6786wtz7s7dj6gmpyfafg8e0exh5wvye5cygvvxyyxhpsmj8q0e
shardShardrequired

Possible values: [0, 1, 2]

leasestringrequired

Lease token v1, base64url without padding, 192 characters.

Possible values: >= 192 characters and <= 192 characters

leaseExpiresAtMsinteger<int64>required

Unix time in milliseconds.

Possible values: >= 0

serverTimeMsinteger<int64>required

Unix time in milliseconds.

Possible values: >= 0

chainIdstringrequired
minGasPriceinteger<int64>required
maxGasPriceinteger<int64>required
extraGasRelayedintegerrequired
extraGasGuardedintegerrequired
expectedNonceinteger<int64>

Advisory; present when a fresh nonce view exists.

pinNonceinteger<int64>

Present only on re-sign and cancel leases.

registryVersioninteger<int64>required

The contract's getRegistryVersion() value this assignment was made from. Use it in the cache key when you verify the relayer on chain.

summarystringrequired

Human and LLM readable description of what will be signed.

instructionsstring

Next steps - sign once, read the nonce back, POST /v1/relay with the lease.

freebooleanrequired

True when the call is on the free list and is relayed free of charge. Show this value to the user instead of working it out yourself.

ruinteger<int64>

Relay Units.

Possible values: >= 0

feeMicroUsdcDecimalString

On-chain fee debited from credits (addSenders).

Possible values: Value must match regular expression ^[0-9]+$

contractCall object
endpointstringrequired
argsstring[]required

Hex-encoded arguments in order.

tokenTransfer object
tokenstring
amountDecimalString

Non-negative integer as decimal string (pricing document family).

Possible values: Value must match regular expression ^[0-9]+$

quote objectrequired

A price quote, with amounts as decimal strings. Stateless: quoteMac authenticates the canonical JSON (RFC 8785) of all other members, so any API host can verify a quote it did not issue by recomputing the MAC. No quote is stored; two prepare calls simply give two valid quotes. The MAC key differs per environment, so a devnet quote never verifies on mainnet.

quoteIdstringrequired

At most 12 ASCII bytes, because it becomes the ref of the contract call and data bytes are billed at full gas price. It is q_ followed by the first 10 Crockford base32 characters of an HMAC, keyed with the service's quote key, over corelayer/quote-id/v1 followed by the canonical JSON of every member except quoteId and quoteMac. Any API host can recompute it.

Possible values: Value must match regular expression ^q_[0-9A-Z]{10}$

quoteMacstringrequired

HMAC-SHA256 with the service's quote key over corelayer/quote/v1 followed by the canonical JSON of every other member, quoteId included. Base64url without padding.

Possible values: Value must match regular expression ^[A-Za-z0-9_-]{43}$

tierIdintegerrequired
monthsintegerrequired

Possible values: >= 0 and <= 12

tariffDecimalStringrequired

Non-negative integer as decimal string (pricing document family).

Possible values: Value must match regular expression ^[0-9]+$

tariffVersionintegerrequired
tariffEffectiveMsinteger<int64>required

Unix time in milliseconds.

Possible values: >= 0

priceMicroUsdcDecimalStringrequired

Non-negative integer as decimal string (pricing document family).

Possible values: Value must match regular expression ^[0-9]+$

maxPriceDecimalStringrequired

Non-negative integer as decimal string (pricing document family).

Possible values: Value must match regular expression ^[0-9]+$

pendingTariffstring | nullnullablerequired
issuedAtMsinteger<int64>required

Unix time in milliseconds.

Possible values: >= 0

expiresAtMsinteger<int64>required

Unix time in milliseconds.

Possible values: >= 0

payMicroUsdcDecimalStringrequired

Non-negative integer as decimal string (pricing document family).

Possible values: Value must match regular expression ^[0-9]+$

fromCreditsMicroUsdcDecimalStringrequired

Non-negative integer as decimal string (pricing document family).

Possible values: Value must match regular expression ^[0-9]+$

PreparedPurchase
{
"transaction": {
"nonce": 0,
"value": "string",
"receiver": "erd1mf4u0jr6786wtz7s7dj6gmpyfafg8e0exh5wvye5cygvvxyyxhpsmj8q0e",
"sender": "erd1mf4u0jr6786wtz7s7dj6gmpyfafg8e0exh5wvye5cygvvxyyxhpsmj8q0e",
"gasPrice": 0,
"gasLimit": 0,
"data": "string",
"chainID": "string",
"version": 0,
"options": 0,
"guardian": "erd1mf4u0jr6786wtz7s7dj6gmpyfafg8e0exh5wvye5cygvvxyyxhpsmj8q0e",
"relayer": "erd1mf4u0jr6786wtz7s7dj6gmpyfafg8e0exh5wvye5cygvvxyyxhpsmj8q0e"
},
"assignment": {
"assignmentId": "string",
"relayer": "erd1mf4u0jr6786wtz7s7dj6gmpyfafg8e0exh5wvye5cygvvxyyxhpsmj8q0e",
"shard": 0,
"lease": "string",
"leaseExpiresAtMs": 0,
"serverTimeMs": 0,
"chainId": "string",
"minGasPrice": 0,
"maxGasPrice": 0,
"extraGasRelayed": 0,
"extraGasGuarded": 0,
"expectedNonce": 0,
"pinNonce": 0,
"registryVersion": 0
},
"summary": "string",
"instructions": "string",
"free": true,
"ru": 0,
"feeMicroUsdc": "string",
"contractCall": {
"endpoint": "string",
"args": [
"string"
],
"tokenTransfer": {
"token": "string",
"amount": "string"
}
},
"quote": {
"quoteId": "string",
"quoteMac": "string",
"tierId": 0,
"months": 0,
"tariff": "string",
"tariffVersion": 0,
"tariffEffectiveMs": 0,
"priceMicroUsdc": "string",
"maxPrice": "string",
"pendingTariff": "string",
"issuedAtMs": 0,
"expiresAtMs": 0
},
"payMicroUsdc": "string",
"fromCreditsMicroUsdc": "string"
}