Skip to main content

Meta Sign

Build and return the signable meta-transaction payload for one or more prepared messages.

Request URL

https://testnet.api.euclidprotocol.com/api/v1/execute/meta-txn/sign

Example

curl --request POST \
  --url https://api.euclidprotocol.com/api/v1/execute/meta-txn/sign \
  --header 'content-type: application/json' \
  --data '{
    "msgs": [
      {
        "msg": {
          "target": "lumen1yvgh8xeju5dyr0zxlkvq09htvhjj20fncp5g58np4u25g8rkpgjsvavs5t",
          "call_data": "{...}"
        },
        "type": "withdraw_voucher",
        "token_in": "",
        "token_out": "",
        "token": "euclid",
        "amount_in": "90000",
        "amount_out": ""
      }
    ],
    "sender_address": "lumen10f4xyp6sq3g47yf6m8dfxh233r878wqjegmtug",
    "sender_chain_uid": "lumen"
  }'
{
  "cosmos_raw_payload": "...",
  "evm_raw_payload": "...",
  "meta": [
    {
      "type": "withdraw_voucher",
      "token_in": "",
      "token_out": "",
      "token": "euclid",
      "amount_in": "90000",
      "amount_out": ""
    }
  ],
  "payload": {
    "signer_address": "lumen10f4xyp6sq3g47yf6m8dfxh233r878wqjegmtug",
    "signer_prefix": "lumen",
    "signer_chain_uid": "lumen",
    "call_data": [
      {
        "target": "lumen1yvgh8xeju5dyr0zxlkvq09htvhjj20fncp5g58np4u25g8rkpgjsvavs5t",
        "call_data": "{...}"
      }
    ],
    "expiry": 1772797186,
    "nonce": "1772796886"
  },
  "types": ["withdraw_voucher"]
}

Parameters

FieldTypeDescription
msgsobject[]Array of prepared messages to be signed. Use the message items returned by the previous transaction-construction steps (for example swap, transfer, withdraw). Each item includes type and msg.
sender_addressstringAddress of the signer.
sender_chain_uidstringChain UID of the signer.
expiry_timestringOptional expiry duration (for example 5m, 10m, 1h).

MsgItem

FieldTypeDescription
typestringMessage type (for example swap, transfer_voucher, withdraw_voucher).
msgobjectMessage payload containing target and call_data, typically copied from the corresponding transaction-construction response in the previous step.
token_instringOptional metadata token-in value used for tracking.
token_outstringOptional metadata token-out value used for tracking.
tokenstringOptional metadata token value used for tracking.
amount_instringOptional metadata input amount used for tracking.
amount_outstringOptional metadata output amount used for tracking.

Payload Response

FieldTypeDescription
cosmos_raw_payloadstringCosmos-ready encoded sign bytes.
evm_raw_payloadstringEVM personal-sign formatted message.
metaobject[]Meta summary for tracking.
payloadobjectCanonical payload that is signed and later broadcast.
typesstring[]Transaction types included in the payload.

Payload Object

FieldTypeDescription
signer_addressstringAddress of the signer.
signer_prefixstringSigning prefix (for example 0x, lumen, cosmos).
signer_chain_uidstringChain UID of the signer.
call_dataobject[]Array of target call-data items.
expirynumberExpiry timestamp for the signed payload.
noncestringNonce used for replay protection.