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

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://developers.fireblocks.com/feedback

```json
{
  "path": "/api-reference/tokenization/set-layerzero-peers",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# Set LayerZero peers

> Set LayerZero peers to establish connections between adapter contracts. This endpoint creates peer relationships that enable cross-chain communication. It sets the destination adapter as a peer of the source adapter. If `bidirectional` is true, it also sets the source adapter as a peer of the destination adapter(s).



## OpenAPI

````yaml https://docs.fireblocks.com/api/v1/swagger.yaml post /tokenization/multichain/bridge/layerzero/config/peers
openapi: 3.0.0
info:
  title: Fireblocks API
  description: >
    Fireblocks provides a suite of applications to manage digital asset
    operations and a complete development platform to build your business on the
    blockchain.


    - Visit our website for more information: [Fireblocks
    Website](https://fireblocks.com)

    - Visit our developer docs: [Fireblocks
    DevPortal](https://developers.fireblocks.com)
  version: 1.6.2
  contact:
    email: developers@fireblocks.com
servers:
  - url: https://api.fireblocks.io/v1
    description: Fireblocks Production Environment Base URL
  - url: https://sandbox-api.fireblocks.io/v1
    description: Fireblocks Sandbox Environment Base URL
security: []
paths:
  /tokenization/multichain/bridge/layerzero/config/peers:
    post:
      tags:
        - Tokenization
      summary: Set LayerZero peers
      description: >-
        Set LayerZero peers to establish connections between adapter contracts.
        This endpoint creates peer relationships that enable cross-chain
        communication. It sets the destination adapter as a peer of the source
        adapter. If `bidirectional` is true, it also sets the source adapter as
        a peer of the destination adapter(s).
      operationId: setLayerZeroPeers
      parameters:
        - $ref: '#/components/parameters/X-Idempotency-Key'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetLayerZeroPeersRequest'
      responses:
        '200':
          description: LayerZero peers set successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SetLayerZeroPeersResponse'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '404':
          $ref: '#/components/responses/OriginalTokenLinkNotFoundError'
        '409':
          $ref: '#/components/responses/TokenLinkPreparationError'
        '422':
          $ref: '#/components/responses/OriginalTokenLinkNotFungibleError'
        '500':
          $ref: '#/components/responses/InternalServerError'
      x-codeSamples:
        - lang: TypeScript
          source: >-
            const response:
            Promise<FireblocksResponse<SetLayerZeroPeersResponse>> =
            fireblocks.tokenization.setLayerZeroPeers(tokenizationApiSetLayerZeroPeersRequest);
        - lang: Java
          source: >-
            CompletableFuture<ApiResponse<SetLayerZeroPeersResponse>> response =
            fireblocks.tokenization().setLayerZeroPeers(setLayerZeroPeersRequest,
            idempotencyKey);
        - lang: Python
          source: >-
            response =
            fireblocks.tokenization.set_layer_zero_peers(set_layer_zero_peers_request,
            idempotency_key);
components:
  parameters:
    X-Idempotency-Key:
      name: Idempotency-Key
      in: header
      description: >-
        A unique identifier for the request. If the request is sent multiple
        times with the same idempotency key, the server will return the same
        response as the first request. The idempotency key is valid for 24
        hours.
      required: false
      schema:
        type: string
  schemas:
    SetLayerZeroPeersRequest:
      type: object
      properties:
        vaultAccountId:
          type: string
          description: >-
            The id of the vault account that will be used to inititate
            transactions ot set peers
          example: '0'
        sourceAdapterTokenLinkId:
          type: string
          format: uuid
          description: '`token_link` ID of the source adapter contract'
          example: 123-432-1234-1234-123456789012
        destinationAdapterTokenLinkIds:
          type: array
          items:
            type: string
            format: uuid
          description: Array of `token_link` IDs for destination adapter contracts
          example:
            - 123-432-1234-1234-123456789012
            - 123-432-1234-1234-123456789012
          minItems: 1
        bidirectional:
          type: boolean
          description: If true, also sets peers from destination(s) back to source
          example: true
      required:
        - vaultAccountId
        - sourceAdapterTokenLinkId
        - destinationAdapterTokenLinkIds
        - bidirectional
    SetLayerZeroPeersResponse:
      type: object
      properties:
        txnIds:
          type: array
          items:
            type: string
            format: uuid
          description: >-
            Array of fireblocks transaction IDs, each corresponding to an
            on-chain transaction to set peers
          example:
            - 123-432-1234-1234-123456789012
            - 123-432-1234-1234-123456789012
          minItems: 1
      required:
        - txnIds
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - INTERNAL
                - AUTHENTICATION
                - AUTHORIZATION
                - VALIDATION
                - NOT_FOUND
                - UNPROCESSABLE_ENTITY
                - FORBIDDEN
            message:
              type: string
          required:
            - type
            - message
      required:
        - error
  responses:
    BadRequestError:
      description: Bad request, invalid input data or parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              type: VALIDATION
              message: Invalid input data or parameters
    OriginalTokenLinkNotFoundError:
      description: Token link not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              type: NOT_FOUND
              message: The specified token link was not found
    TokenLinkPreparationError:
      description: Token link preparation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              type: UNPROCESSABLE_ENTITY
              message: An error occurred during token link preparation
    OriginalTokenLinkNotFungibleError:
      description: Token link is not fungible
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              type: UNPROCESSABLE_ENTITY
              message: The token link is not of fungible type
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              type: INTERNAL
              message: >-
                An unexpected error occurred during execution. Please try again
                later.

````