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

# Get encoded VTXO

> Returns the hex-encoded serialization of a VTXO. The `encoded` field can be passed to `POST /wallet/import-vtxo` to re-import this VTXO.



## OpenAPI

````yaml https://gitlab.com/ark-bitcoin/bark/-/raw/master/bark-rest/openapi.json get /api/v1/wallet/vtxos/{id}/encoded
openapi: 3.1.0
info:
  title: barkd REST API
  description: >-
    A simple REST API for barkd, a wallet daemon for integrating bitcoin
    payments into your app over HTTP. Supports self-custodial Lightning, Ark,
    and on-chain out of the box.


    barkd is a long-running daemon best suited for always-on or
    high-connectivity environments like nodes, servers, desktops, and
    point-of-sale terminals.


    All endpoints return JSON. Amounts are denominated in satoshis.
  contact:
    name: Second Team
    email: hello@second.tech
  license:
    name: MIT
    identifier: MIT
  version: 0.1.4
servers: []
security:
  - bearer: []
tags:
  - name: boards
    description: Move on-chain bitcoin onto the Ark protocol.
  - name: exits
    description: Move bitcoin back on-chain without server cooperation.
  - name: fees
    description: Estimate fees for wallet operations before executing them.
  - name: lightning
    description: Create Lightning invoices and track receives.
  - name: onchain
    description: Manage barkd's on-chain bitcoin wallet.
  - name: wallet
    description: Manage Ark balances and VTXOs, send payments via Ark, LN, and on-chain.
  - name: bitcoin
    description: Query bitcoin network data.
  - name: notifications
    description: Receive real-time notifications from barkd.
paths:
  /api/v1/wallet/vtxos/{id}/encoded:
    get:
      tags:
        - wallet
      summary: Get encoded VTXO
      description: >-
        Returns the hex-encoded serialization of a VTXO. The `encoded` field can
        be passed to `POST /wallet/import-vtxo` to re-import this VTXO.
      operationId: get_vtxo_encoded
      parameters:
        - name: id
          in: path
          description: VTXO identifier formatted as `txid:vout`.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Returns the hex-encoded serialized VTXO
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EncodedVtxoResponse'
        '400':
          description: Invalid VTXO id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
        '404':
          description: VTXO not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
components:
  schemas:
    EncodedVtxoResponse:
      type: object
      description: |-
        Response for the encoded-VTXO endpoint.

        Wraps the hex-encoded VTXO in a named field so clients can easily
        extract it.
      required:
        - encoded
      properties:
        encoded:
          $ref: '#/components/schemas/EncodedVtxo'
          description: Hex-encoded serialized VTXO.
    BadRequestError:
      type: object
      required:
        - message
      properties:
        message:
          type: string
    NotFoundError:
      type: object
      required:
        - resources
        - message
      properties:
        message:
          type: string
        resources:
          type: array
          items:
            type: string
    InternalServerError:
      type: object
      required:
        - message
      properties:
        message:
          type: string
    EncodedVtxo:
      type: string
      description: |-
        Hex-encoded serialized VTXO.

        Serializes as a plain hex string. Can be passed to
        `POST /wallet/import-vtxo` to re-import this VTXO.
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: AuthToken
      description: Base64url-encoded auth token

````