RGB-Tools / rgb-lightning-node

MIT License
17 stars 19 forks source link

about not enough funds #12

Closed cymqqqq closed 9 months ago

cymqqqq commented 9 months ago

Hi there, I have set up a testnet node on my local machine here, and I run createutxo, issueassets, and sendbtc interface, the errors comes out: Not enough funds, call getaddress and send 1000178 satoshis. So, the question is, how do you generate satoshis and send them to a specific address? (which interface to call?)

zoedberg commented 9 months ago

If you google "bitcoin testnet faucet" you'll find several services offering free testnet bitcoins. Call the /address API to obtain an address, give it to the faucet and then wait for it to send you some sats. After receiving enough sats you'll be able to create utxos, which is needed to issue assets.

cymqqqq commented 9 months ago

thanks for answering, another question is: If I have set up a lightning node, do I must to obtain test bitcoins by faucet, or are there already some initialized tested bitcoins on my unlocked lightning node?

zoedberg commented 9 months ago

This is not possible because it would mean hardcoding a fixed seed, that users could then also "empty-out". If you are having hard times getting testnet bitcoins I suggest trying the node on regtest, where you can send arbitrary amounts of bitcoins to the node and mine at will, it should simplify testing a lot.

cymqqqq commented 9 months ago

Hi @zoedberg , I'm here again, so I have set up the regtest node at daemon 3001 port as you told me, and then next step which interface should I call? (I have read all interfaces, but none of them are related to "send satoshi", maybe I made some wrong steps?)

cymqqqq commented 9 months ago

First, I run ./regtest mine 103, nothing prints out. Then I run ./regtest sendtoaddress address amount, and it prints: error code: -6 error message: Insufficient funds

cymqqqq commented 9 months ago

Hi @zoedberg , maybe I have solved this problem: 1.I used /address to generate a BTC address 2.I used './regtest sendtoaddress address amount ' to send BTC to 1 step, it prints: e99993d8a573f491d7164b95322e47cc719aefef43916113a58676e0512f2f32 3.I created utxo 4.I issue assets, return a rgb:id Did I miss something? Or all four steps can build a complete procedure?

zoedberg commented 9 months ago

Did I miss something? Or all four steps can build a complete procedure?

I'm not sure what do you mean for "complete procedure". What you could try now is to run a second node and try to open a channel with it. Anyway, the reported issue seems to be fixed so I'll close this. Feel free to open a new issue in case you encounter other problems