> ## Documentation Index
> Fetch the complete documentation index at: https://xoxno.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Sign a batch of transactions

> Receives a batch of transactions, co-signs each with the shard-specific Ed25519 relayer key (Relayer V3 pattern), and broadcasts the co-signed transactions to the P2P network. Returns the transaction hashes for successfully signed transactions and per-item errors for failures.

The `relayer` field on each transaction must match the sender's shard. Use `shard_of(sender) = last_byte_of_pubkey % 3` to select the correct relayer address.



## OpenAPI

````yaml /api-reference/relayer-openapi.json post /v1/sign
openapi: 3.1.0
info:
  title: XOXNO Relayer API
  version: 1.0.0
  description: >-
    High-performance transaction co-signing and broadcast service for
    MultiversX. Sign batches of transactions with shard-specific relayer keys,
    broadcast pre-signed transactions via P2P gossipsub, and query historical
    network statistics.
servers:
  - url: https://relayer.xoxno.com
security: []
paths:
  /v1/sign:
    post:
      tags:
        - Relayer
      summary: Sign a batch of transactions
      description: >-
        Receives a batch of transactions, co-signs each with the shard-specific
        Ed25519 relayer key (Relayer V3 pattern), and broadcasts the co-signed
        transactions to the P2P network. Returns the transaction hashes for
        successfully signed transactions and per-item errors for failures.


        The `relayer` field on each transaction must match the sender's shard.
        Use `shard_of(sender) = last_byte_of_pubkey % 3` to select the correct
        relayer address.
      operationId: signTransactions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SignRequest'
            example:
              transactions:
                - nonce: 42
                  value: '0'
                  receiver: >-
                    erd1qqqqqqqqqqqqqpgq5rf2unca5uen2eqkvlh3re25qk4trspk0n4sy8qlmc
                  sender: >-
                    erd1qyu5wthldzr8wx5c9ucg8kjagg0jfs53s8nr3zpz3hypefsdd8ssycr6th
                  gasPrice: 1000000000
                  gasLimit: 50000000
                  data: c3dhcA==
                  chainID: '1'
                  version: 2
                  signature: >-
                    a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4
                  relayer: >-
                    erd1l0x0n5yxsfcy93gm0vyvx9m9f7cte9h9vuq4am33ugpw3d5r3hvqx6f59h
      responses:
        '200':
          description: Batch processed. Check `failed` array for per-transaction errors.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SignResponse'
              example:
                hashes:
                  - >-
                    abc123def456abc123def456abc123def456abc123def456abc123def456abcd
                failed: []
        '400':
          description: Empty transactions array or malformed JSON.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: transactions payload cannot be empty
components:
  schemas:
    SignRequest:
      type: object
      required:
        - transactions
      properties:
        transactions:
          type: array
          items:
            $ref: '#/components/schemas/Transaction'
          minItems: 1
          description: Batch of transactions to co-sign with the relayer key and broadcast.
    SignResponse:
      type: object
      properties:
        hashes:
          type: array
          items:
            type: string
          description: >-
            Transaction hashes for successfully signed and broadcast
            transactions.
        failed:
          type: array
          items:
            $ref: '#/components/schemas/TxError'
          description: Per-transaction errors for items that failed signing or broadcast.
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message.
    Transaction:
      type: object
      description: >-
        A MultiversX transaction object. Fields use camelCase JSON
        serialization. Optional fields are omitted when null.
      required:
        - nonce
        - value
        - receiver
        - sender
        - gasPrice
        - gasLimit
        - chainID
        - version
      properties:
        nonce:
          type: integer
          format: uint64
          description: Sender's current transaction counter.
        value:
          type: string
          description: EGLD amount in atomic units (1 EGLD = 10^18 atomic units).
        receiver:
          type: string
          description: Receiver's bech32 address (starts with `erd1`).
        sender:
          type: string
          description: Sender's bech32 address (starts with `erd1`).
        senderUsername:
          type: string
          description: Base64-encoded sender username (herotag). Optional.
        receiverUsername:
          type: string
          description: Base64-encoded receiver username (herotag). Optional.
        gasPrice:
          type: integer
          format: uint64
          description: 'Gas price in atomic units. Minimum: `1000000000`.'
        gasLimit:
          type: integer
          format: uint64
          description: Maximum gas units the transaction may consume.
        data:
          type: string
          description: >-
            Base64-encoded transaction payload (smart contract call data).
            Optional.
        chainID:
          type: string
          description: '`"1"` for mainnet, `"D"` for devnet, `"T"` for testnet.'
        version:
          type: integer
          format: uint32
          description: Transaction version. Use `2`.
        options:
          type: integer
          format: uint32
          description: Transaction options bitmask. Optional.
        signature:
          type: string
          description: >-
            Hex-encoded Ed25519 signature over the canonical transaction
            serialization. Optional for sign endpoint (relayer adds it);
            required for broadcast.
        guardian:
          type: string
          description: Guardian bech32 address for guarded accounts. Optional.
        guardianSignature:
          type: string
          description: Guardian's hex-encoded signature. Required when `guardian` is set.
        relayer:
          type: string
          description: >-
            Shard-specific relayer bech32 address. Required for `/v1/sign`
            (relay mode). Must match sender's shard.
        relayerSignature:
          type: string
          description: >-
            Hex-encoded relayer signature. Added by the relayer service; do not
            set manually.
    TxError:
      type: object
      properties:
        index:
          type: integer
          description: Zero-based index of the failed transaction in the batch.
        error:
          type: string
          description: >-
            Human-readable error reason (e.g., `shard mismatch`, `invalid
            signature`).

````