Cardano CLI – ADA送金完全ガイド

未分類

このガイドでは、Cardano CLIを使ってADAを送金する完全なフローを提供します。各コマンドをコピー&ペーストして実行できます。

事前準備

以下のファイルが必要です:

  • payment.addr – 送信元アドレス
  • payment.skey – 秘密鍵
  • payment.vkey – 公開鍵

⚠️ 注意: 秘密鍵(payment.skey)は絶対に他人と共有しないでください。


ステップ別コマンド

スクリプトを使わず、1つずつ実行したい場合は以下のコマンドを順番に実行してください。

Step 1: 送金情報の設定

destinationAddress="addr1_ここに送金先アドレスを入力"
amountToSend=5000000

Step 2: UTXO取得と残高計算

cardano-cli conway query utxo \
    --address $(cat payment.addr) \
    --mainnet > balance.out

tx_in=""
total_balance=0
while read -r utxo; do
    in_addr=$(awk '{ print $1 }' <<< "${utxo}")
    idx=$(awk '{ print $2 }' <<< "${utxo}")
    utxo_balance=$(awk '{ print $3 }' <<< "${utxo}")
    total_balance=$((${total_balance}+${utxo_balance}))
    tx_in="${tx_in} --tx-in ${in_addr}#${idx}"
done < balance.out
txcnt=$(cat balance.out | wc -l)

echo "残高: ${total_balance} lovelace"
echo "UTXO数: ${txcnt}"

Step 3: プロトコルパラメータ取得

cardano-cli conway query protocol-parameters \
    --mainnet \
    --out-file protocol.json

Step 4: 現在のスロット取得

currentSlot=$(cardano-cli conway query tip --mainnet | jq -r '.slot')
echo "現在のスロット: ${currentSlot}"

Step 5: トランザクション構築

cardano-cli conway transaction build \
    ${tx_in} \
    --tx-out ${destinationAddress}+${amountToSend} \
    --change-address $(cat payment.addr) \
    --invalid-hereafter $(( ${currentSlot} + 10000)) \
    --mainnet \
    --out-file tx.raw

Step 6: 署名

tx.raw を、エアギャップの cnode にコピーします。

cardano-cli conway transaction sign \
    --tx-body-file tx.raw \
    --signing-key-file payment.skey \
    --signing-key-file stake.skey \
    $NODE_NETWORK \
    --out-file tx.signed

Step 7: 送信

cardano-cli conway transaction submit \
    --tx-file tx.signed \
    --mainnet

Step 8: トランザクションID確認

txId=$(cardano-cli conway transaction txid --tx-file tx.signed)
echo "Transaction ID: ${txId}"
echo "https://cardanoscan.io/transaction/${txId}"

よくある操作

残高確認のみ
cardano-cli conway query utxo \
    --address $(cat payment.addr) \
    --mainnet
ADA⇔lovelace変換

5 ADA を lovelace に変換

echo "5 * 1000000" | bc

5000000 lovelace を ADA に変換

echo "scale=6; 5000000 / 1000000" | bc
現在のチェーン情報確認
cardano-cli conway query tip --mainnet

トラブルシューティング

エラー: FeeTooSmallUTxO

原因: 手数料不足

解決: transaction buildを使用している場合は自動計算されるため、このエラーは通常発生しません。build-rawを使用している場合は、手数料を再計算してください。

エラー: BadInputsUTxO

原因: 指定したUTXOが存在しないか既に使用済み

解決: コピー

# UTXOを再取得

cardano-cli conway query utxo \
    --address $(cat payment.addr) \
    --mainnet
エラー: OutsideValidityIntervalUTxO

原因: トランザクションの有効期限切れ

解決: コピー

# 現在のスロットを再取得してトランザクションを再構築

currentSlot=$(cardano-cli conway query tip --mainnet | jq -r '.slot')
エラー: ValueNotConservedUTxO

原因: input合計 ≠ output合計 + 手数料

解決: transaction buildを使用すれば自動的に計算されます。


注意事項

  • 秘密鍵の保護: payment.skeyは絶対に他人と共有しないでください
  • テストネット: 初めて試す場合は--mainnet--testnet-magic 1に変更してテストネットで試すことをおすすめします
  • 手数料: 通常0.17 ADA程度の手数料が発生します
  • 最小送金額: 実用上、1 ADA以上の送金をおすすめします

参考リンク

このガイドは2025年3月時点の情報に基づいています。最新情報は公式ドキュメントをご確認ください。

委任のご検討をお願いします☕️


本稿はカルダノステークプール「CoffeePool☕️」「CardanoKissa☕️」作成しました。
COFFEの活動を応援いただける方はぜひ、委任(Delegate)のご検討をお願いいたします😊

COFFE
[COFFE] CoffeePool☕️
● Active
Live Stake32.34 M ₳
委任者数605
飽和度41.99%
生成ブロック13,579
手数料2.5% + 340 ADA
Pledge101 ADA
KISSA
[KISSA] CardanoKissa☕️
● Active
Live Stake1.18 M ₳
委任者数11
飽和度1.53%
生成ブロック157
手数料2.5% + 340 ADA
Pledge101 ADA

🗳️「DRep ID」もぜひご検討ください!(クリックでコピーできます↓)

hix_coffeepool
hix_coffeepool ● Active
投票力 (Live Stake) 58,990,340 ₳
hix_coffeepool — DRep情報
🎯 Motivations(動機)
私がカルダノのガバナンスに参加する理由は「子どもたちに透明性の高い社会を残すため」です。カルダノのエコシステムが、より自由で公正な社会を実現するための基盤となれるよう、透明性と分散化を重視した視点で投票を行います。ブロックチェーンの本質は、独立した分散型のエコシステムであり、カルダノはこの原則を最も確実に実現したプラットフォームであるべきです。それを実現するシンプルな答えとして、カルダノにおける「小さなガバナンス」を目指します。分散化を徹底し、ガバナンス予算を最小限にとどめることで、市場原理を尊重した自由なエコシステムが実現できます。この精神をもとに、完全に独立した立場から、忖度のない投票を行っていきます。I participate in Cardano governance "to leave a transparent society for our children." I vote with a focus on transparency and decentralization, so that the Cardano ecosystem can serve as the foundation for a freer and more just society. The essence of blockchain is an independent, decentralized ecosystem, and Cardano should be the platform that most reliably embodies this principle. The simple answer to achieving this is "small governance" in Cardano. By thoroughly pursuing decentralization and minimizing governance budgets, we can create a free ecosystem that respects market principles. Based on this spirit, I vote from a completely independent position, without compromise.
📌 Objectives(目標)
透明性の高い社会を実現するため、最小限のガバナンス支出、DRepにおける委任上限の導入、DRep委任期間の創設など、さまざまなガバナンス改善提案を行っています。投票においては、コミュニティとの対話や意見交換をもとに判断を行い、可能な限り論拠を提出しています。判断においては、憲法だけでなくコミュニティとの連携におけるプロセスの適切性を重視し、小さなガバナンスの精神を第一に、長期的な視点から忖度のない判断を行なっていきます。coffeepool.jpでは詳細な解説記事を公開し、わかりやすい情報発信を心がけています。カルダノは壮大な実験です。失敗から学び、改善を重ねることで、人類初の大規模分散型ガバナンスを成功させることができると信じています。To achieve a transparent society, I propose various governance improvements: minimal governance spending, delegation caps for DReps, and term limits for DRep delegations. In voting, I make decisions based on dialogue and exchange with the community, providing rationale whenever possible. I prioritize not only the constitution but also the appropriateness of processes in community collaboration, adhering to the spirit of small governance and making independent judgments from a long-term perspective. I provide accessible information through detailed articles on coffeepool.jp. Cardano is a grand experiment. By learning from failures and continuous improvement, I believe we can succeed in humanity's first large-scale decentralized governance.
🎓 Qualifications(資格・経歴)
カルダノSPOであり、フリーランスの編集者/ライターです。大手出版社で書籍・雑誌・ウェブメディアの編集者として勤務した後、2018年からADAホルダーとなり、2021年からステークプール「CoffeePool」をスタート。Webサイト「coffeepool.jp」では、プロの編集者目線から、初心者向けにカルダノのさまざまな情報を提供。また、CIP1694開始時には、暫定憲法委員会の一人として憲法判断を執行。SPO、編集者、元憲法委員として、これまでカルダノのネットワーク、コミュニティ、ガバナンスなど多方面で貢献しています。I am a Cardano SPO and freelance editor/writer. After working as an editor for books, magazines, and web media at a major publishing company, I became an ADA holder in 2018 and started the stake pool "CoffeePool" in 2021. On my website "coffeepool.jp," I provide various information about Cardano for beginners from a professional editor's perspective. When CIP-1694 began, I served as one of the interim Constitutional Committee members, executing constitutional judgments. As an SPO, editor, and former Constitutional Committee member, I have contributed to Cardano across multiple areas: network, community, and governance.


CoffeePoolならびにKISSAは、5年以上の安定稼働と1万ブロック以上の生成実績を持つステークプールです。

参加者募集中!【カルダノキッサ】CoffeePool☕️が運営するチャットスペース

初心者でも長期ホルダーでも、楽しくカルダノ について語り合える discordスペースを作りました😊☕️
・なりすましやscam対策のためXアカウント認証で運営😊
・初心者ホルダーさん大歓迎!☕️
SPOも続々参加しています! ぜひお気軽にお立ち寄りください。
参加方法は☟
discord.gg/TNy7QNua7c