<p>If you like using Python, try the <a href="https://gitlab.com/viper-staking/cardano-tools" rel="nofollow noreferrer">Cardano-Tools</a> library that I put together. Its basically a smart wrapper around the CLI that takes care of extra steps for you such as selecting the UTxO(s). You need the <code>cardano-cli</code> installed and a synced <code>cardano-node</code> running. Below is some example code.</p>
<pre><code>from cardano_tools import ShelleyTools

# Test Inputs (example paths)
path_to_cli = &quot;/home/user/.cabal/bin/cardano-cli&quot;
path_to_socket = &quot;/home/user/relay-node/db/node.socket&quot;
working_dir = &quot;/home/user/.cardano-tools/&quot;

# Create a ShelleyTools object
shelley = ShelleyTools(
    path_to_cli, 
    path_to_socket, 
    working_dir, 
    network=&quot;--mainnet&quot;  # Can also use testnet magic here
 )

 amt = 10 # Ada to send
 to_addr = &quot;addr1...&quot; # Address to send the ADA to
 from_addr = &quot;addr1...&quot; # Address to send the ADA from
 key_file = &quot;/path/to/addr.skey&quot; # path to the signing key file

 shelley.send_payment(amt, to_addr, from_addr, key_file)
</code></pre>
<p>Note that you need the signing key file that belongs to the specific address that you are sending the ADA from.</p>

CC BY-SA 4.0
2021-05-06T02:28:10.393Z
Thank you, I have not used Python for a while, but I will certainly give it a go.
Matt
CC BY-SA 4.0
2021-05-09T02:52:37.623Z
Hello @nalyd88, that worked just fine after a bit playing about.  Thank you.
Matt
CC BY-SA 4.0
2021-05-11T02:05:40.023Z
Happy to help! Please feel free to leave feedback on our library or make pull requests.
nalyd88
CC BY-SA 4.0
2021-05-05T01:05:40.487Z
2021-05-11T02:08:27.607Z
2021-05-11T02:08:27.607Z
nalyd88
<p>If possible, always use the official documentation to protect yourself from scams. For sending a simple transaction using the <code>cardano-cli</code>, have <a href="https://docs.cardano.org/projects/cardano-node/en/latest/stake-pool-operations/simple_transaction.html" rel="nofollow noreferrer">a look at docs.cardano.org</a>.</p>
<p>As for the error, when inspecting it, you will find it says <code>OutputTooSmallUTxO</code>. This is because of the <code>minUTxOValue</code> protocol parameters which is used to prevent dusting up the UTXO set. It is now set to <code>10000000</code> lovelaces, that means you cannot send an output smaller than this amount, which is probably something you are trying to do.</p>

CC BY-SA 4.0
2021-05-04T00:54:13.610Z
It's also worth practicing with cardano-cli on the testnet rather than using real ADA. Configuration files and instructions are found at docs.cardano.org
Ben NOBLE
CC BY-SA 4.0
2021-05-03T23:27:07.703Z
2021-05-03T23:27:07.703Z
Marek Mahut - StakeNuts
<p>I followed the documentation for building a Relay and Block node.
Part of that involved sending some ADA to the block producing node's address, to be used as a stake pool deposit.</p>
<p>However, the documentation showed the deposit as 2,000,000 lovelace. In fact it's 500,000,000 according to <code>mainnet-shelley-genesis.json</code>, and that's too rich for me to play with tutorials. So I'd like to return the ADA from the Block node to my wallet.</p>
<p>I found this document showing <a href="https://www.coincashew.com/coins/overview-ada/guide-how-to-build-a-haskell-stakepool-node#18-9-send-a-simple-transaction-example" rel="nofollow noreferrer">how to make a payment</a>.
I calculated the amount to be the total holding balance of the Block address, less the fee.</p>
<p>The transaction failed. Here's the error:</p>
<pre><code>Command failed: transaction submit  Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraMary (ApplyTxError [LedgerFailure (UtxowFailure (UtxoFailure (OutputTooSmallUTxO [(Addr Mainnet (KeyHashObj (KeyHash &quot;f1a1639d8012278565242d449223c7d40e6e87c81021b99f3bac4749&quot;)) (StakeRefBase (KeyHashObj (KeyHash &quot;a9f00a2910b88d5aacd9ef1c8ef4d06ebf7faf1618876a60ed088cc1&quot;))),Value 1 (fromList []))])))])
</code></pre>
<p>I don't understand the error, and I'm wondering if the documentation is outdated (given the stake deposit was wrong).</p>
<p>Is there a more current document showing how to submit a payment, using cardano-cli and keys?</p>

<documentation><cardano-cli><payment>
How do I make a payment from a node address to a wallet using cardano-cli on mainnet?
# How do I make a payment from a node address to a wallet using cardano-cli on mainnet?

(Asked by: username_0 on 2021-05-03)

I followed the documentation for building a Relay and Block node.
Part of that involved sending some ADA to the block producing node's address, to be used as a stake pool deposit.
However, the documentation showed the deposit as 2,000,000 lovelace. In fact it's 500,000,000 according to mainnet-shelley-genesis.json, and that's too rich for me to play with tutorials. So I'd like to return the ADA from the Block node to my wallet.
I found this document showing how to make a payment.
I calculated the amount to be the total holding balance of the Block address, less the fee.
The transaction failed. Here's the error:
Command failed: transaction submit  Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraMary (ApplyTxError [LedgerFailure (UtxowFailure (UtxoFailure (OutputTooSmallUTxO [(Addr Mainnet (KeyHashObj (KeyHash "f1a1639d8012278565242d449223c7d40e6e87c81021b99f3bac4749")) (StakeRefBase (KeyHashObj (KeyHash "a9f00a2910b88d5aacd9ef1c8ef4d06ebf7faf1618876a60ed088cc1"))),Value 1 (fromList []))])))])

I don't understand the error, and I'm wondering if the documentation is outdated (given the stake deposit was wrong).
Is there a more current document showing how to submit a payment, using cardano-cli and keys?

**Tags:** documentation, cardano-cli, payment

---

## 2 answers

### Answer by username_1 on 2021-05-05. Score: 1 | Accepted answer

If you like using Python, try the Cardano-Tools library that I put together. Its basically a smart wrapper around the CLI that takes care of extra steps for you such as selecting the UTxO(s). You need the cardano-cli installed and a synced cardano-node running. Below is some example code.
from cardano_tools import ShelleyTools

# Test Inputs (example paths)
path_to_cli = "/home/user/.cabal/bin/cardano-cli"
path_to_socket = "/home/user/relay-node/db/node.socket"
working_dir = "/home/user/.cardano-tools/"

# Create a ShelleyTools object
shelley = ShelleyTools(
    path_to_cli, 
    path_to_socket, 
    working_dir, 
    network="--mainnet"  # Can also use testnet magic here
 )

 amt = 10 # Ada to send
 to_addr = "addr1..." # Address to send the ADA to
 from_addr = "addr1..." # Address to send the ADA from
 key_file = "/path/to/addr.skey" # path to the signing key file

 shelley.send_payment(amt, to_addr, from_addr, key_file)

Note that you need the signing key file that belongs to the specific address that you are sending the ADA from.

> **Comments:**
> **username_0**: Thank you, I have not used Python for a while, but I will certainly give it a go.  
> **username_0**: Hello @nalyd88, that worked just fine after a bit playing about.  Thank you.  
> **username_1**: Happy to help! Please feel free to leave feedback on our library or make pull requests.  

---

### Answer by username_2 on 2021-05-03. Score: 3

If possible, always use the official documentation to protect yourself from scams. For sending a simple transaction using the `cardano-cli`, have [a look at docs.cardano.org](https://docs.cardano.org/projects/cardano-node/en/latest/stake-pool-operations/simple_transaction.html).

As for the error, when inspecting it, you will find it says `OutputTooSmallUTxO`. This is because of the `minUTxOValue` protocol parameters which is used to prevent dusting up the UTXO set. It is now set to `10000000` lovelaces, that means you cannot send an output smaller than this amount, which is probably something you are trying to do.

> **Comments:**
> **username_3**: It's also worth practicing with cardano-cli on the testnet rather than using real ADA. Configuration files and instructions are found at docs.cardano.org  

---

