entreplanctonyballenas
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee
  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # Configurar una wallet en Bitcoin Core ###### tags: `bitcoin` `cli` `wallet` _Ahora que ya tienes un nodo de bitcoin vas a aprender a usarlo para crear carteras_ **Tabla de contenido** [TOC] ## Autor **EntrePlanctonyBallenas**. Twitter para correcciones, comentarios o sugerencias: [@entreplanctony1](https://twitter.com/Entreplanctony1) El presente tutorial fue elaborado para el [Seminario socrático de Mastering Bitcoin](https://libreriadesatoshi.com/) a través de [@libreriadesatoshi](https://twitter.com/libdesatoshi). En el siguiente enlace puedes encontrar la documentación de referencia: [Setting Up Your Wallet](https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/blob/master/03_3_Setting_Up_Your_Wallet.md) :::success :bulb: **¿Tienes un nodo de bitcoin?** En este tutorial explicamos como usar la línea de comando de bitcoin core (bitcoin-cli), por lo que debes tener un nodo de bitcoin, también se asume que sabes cómo usar el modo ++testnet++, si no has instalado un nodo o no sabes como usar la testnet puedes hacerlo consultando los [Tutoriales sobre Nodos de Bitcoin](/jprsYssCTvuunqevvvzkZw). **NOTA:** Los ejemplos de este tutorial se corren en un nodo inicializado por configuracion (bitcoin.conf) en modo testnet. ::: ## ¿Qué es una wallet de Bitcoin? Una **wallet** (_billetera en español_) de Bitcoin es el equivalente digital de una billetera física en la red Bitcoin. Almacena información sobre la cantidad de bitcoins que te pertenecen y en qué direcciones se encuentra, así como las formas en que puedes gastarlo. Gastar dinero físico es intuitivo, pero para gastar bitcoins, los usuarios deben proporcionar la clave privada correcta asociada a una clave pública. La información del par de claves se guarda en un archivo de la wallet, además de los datos sobre preferencias y transacciones. En su mayor parte, no tendrás que preocuparte por esa clave privada: el software la usará cuando sea necesario. Sin embargo, esto hace que el archivo sea extremadamente importante: si lo pierdes, pierdes tus claves privadas, y si pierdes tus claves privadas, ¡pierdes tus fondos! :::danger :no_entry: Las wallets que puedes crear con _Bitcoin Core_ no usan frases semillas, en su lugar puedes usar un password para encriptarlas, por lo tanto, aunque las wallets de _Bitcoin Core_ son funcionales y muy útiles para fines educacionales, ++no son recomendables para guardar bitcoin real++ en ellas. ::: ## Crear una wallet simple Al inicializar el software de _Bitcoin Core_ no hay ninguna wallet cargada, por lo que debes crear una para poder interactuar con la red. El comando para crear wallets es: ``` python bitcoin-cli -named createwallet wallet_name="nombre-de-tu-wallet" descriptors=false ``` Hay muchas opciones para crear wallets, por ahora solo crearemos una simple. Pero puedes explorar las opciones con el comando **bitcoin-cli help createwallet** En el siguiente ejemplo estamos creando una wallet llamada ++"prueba1"++ y el resultado será el siguiente, si en el campo de "warning" no hay ningún mensaje de error, quiere decir que se creó correctamente ``` json bitcoin-cli -named createwallet wallet_name="prueba1" descriptors=false { "name": "prueba1", "warning": "" } ``` Con una wallet creada, ahora debemos crear una dirección pública que será donde recibiremos bitcoin, el comando es el siguiente: ``` python bitcoin-cli getnewaddress "etiqueta" "Tipo_de_direccion" ``` Donde: - "**etiqueta**" es un valor de texto opcional definido por nosotros para diferenciar esta dirección dentro de nuestra wallet. - "**Tipo_de_direccion**" es un valor de texto que puede ser una de las siguientes 3 opciones: "**legacy**", "**p2sh-segwit**" y "**bech32**". El siguiente ejemplo crea una dirección llamada "**faucet**" y que será de tipo "**bech32**", la cadena resultante será la dirección de depósito: ``` json bitcoin-cli getnewaddress "faucet" "bech32" tb1qnnvqdmuhkn77lm0jds3gvfhc5yqgjgfx6qukt8 ``` Tenga en cuenta que esta dirección comienza con las letras "**tb1**" porque es una dirección **bech32** de **++testnet++**, si hubiéramos especificado "**legacy**" sería una "**m**" (o, a veces, una "**n**") o sería un "**2**" para una dirección "**P2SH**". :::info 🔗 TESTNET vs. MAINNET: La dirección principal equivalente comenzaría con un "**1**" (para **Legacy**), "**3**" (para **P2SH**) o "**bc1**" (para **Bech32**). ::: ## Enviar Testnet coins a tu wallet Ahora que tienes una dirección de bitcoin, puedes ir a alguna _faucet_ que regale testnet coins de bitcoin como [https://bitcoinfaucet.uo1.net/](https://bitcoinfaucet.uo1.net/) Solo copia la dirección testnet que acabas de crear, introdúcela en "_bitcoin address_" y da clic en "_Send testnet bitcoins_" ## Consulta tu balance Después de unos minutos, tu transacción deberá estar confirmada, por lo que ahora querrás saber, cómo confirmas que recibiste el saldo. Los siguientes 3 comandos te dirán tu balance total, el que hay un tu cartera y las **txid** (++utxo++) que tienes para gastar respectivamente: ```json= bitcoin-cli getbalance 0.00001000 bitcoin-cli getwalletinfo { "walletname": "prueba1", "walletversion": 169900, "format": "bdb", "balance": 0.00001000, "unconfirmed_balance": 0.00000000, "immature_balance": 0.00000000, "txcount": 1, "keypoololdest": 1677021603, "keypoolsize": 999, "hdseedid": "e82e328cb77dc2bba1fea97525a98a735361d3bb", "keypoolsize_hd_internal": 1000, "paytxfee": 0.00000000, "private_keys_enabled": true, "avoid_reuse": false, "scanning": false, "descriptors": false } bitcoin-cli listunspent [ { "txid": "fc2067320c7811079a826c80785f509769c20537a322457be0489c33662ddf4d", "vout": 0, "address": "tb1qnnvqdmuhkn77lm0jds3gvfhc5yqgjgfx6qukt8", "label": "faucet", "scriptPubKey": "00149cd806ef97b4fdefedf26c228626f8a100892126", "amount": 0.00001000, "confirmations": 1, "spendable": true, "solvable": true, "desc": "wpkh([cef220f5/0'/0'/0']02e2f07438f06cdb9ad240aff30cfa699e11d87732c6431d23ad91316bf14ed723)#y4a0g4pw", "safe": true } ] ``` ## Activar y Desactivar una wallet Cada vez que reinicies el software de *Bitcoin Core* tendrás que cargar una wallet creada ya que por default ninguna wallet se carga al inicializar (a menos que lo hayas definido al crear la wallet, mira el *help* de *createwallet*). Cada vez que creas una wallet, se crea un directorio con el nombre de la wallet en la ruta de archivos que hayas definido en la instalación de *Bitcoin Core*. Ese directorio contiene la información de tu wallet y las llaves que esta administra. Para visualizar este directorio usa: ```json bitcoin-cli listwalletdir { "wallets": [ { "name": "prueba1" }, { "name": "prueba2" } ] } ``` Una vez localizado el nombre de tu wallet, para activarla, usa el comando: ``` bitcoin-cli loadwallet nombre-de-wallet ``` Si quieres desactivar una wallet (para crear una nueva) usa el comando: ``` bitcoin-cli unloadwallet nombre-de-wallet ``` Para listar el nombre de la wallet que tienes activa actualmente: ``` bitcoin-cli listwallets ``` ## :zap: Donaciones :::success Si te fue útil este material puedes agradecer a Iván @entreplanctonyballenas, enviándole un aporte vía Lightning Address: entreplanctonyballenas@getalby.com :::

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully