Closed cymqqqq closed 9 months ago
5.then use public key to open the channel, it failed.
Could you please share the command you gave and the error message you received?
Another question, when I create a RGB invoice, can I call sendasset directly, or I must first connect peer, then open the channel, and finally send asset?
The /sendasset
API is used to send RGB assets on-chain, so it's not related to the existence of a channel. To send RGB assets off-chain (via a LN channel), there are two APIs:
/sendpayment
, which requires the receiver to create a LN invoice (with the API /lninvoice
)/keysend
, which doesn't require any invoice from the receiverAnyway, when opening a channel the connection to the peer is automatically handled, so it shouldn't be necessary to call the /connectpeer
API.
I called /Channels/openChannels, for the parameters: { "peer_pubkey_and_addr": "03d00194e035dd0b3ed985695da41916c31d5cc9cb7401269bed51f1aef1f2b17f@localhost:9735", "capacity_sat": 3000000, "push_msat": 646001, "asset_amount": 10, "asset_id": "rgb:jHSeho3-K2KoXQhsQ-9oAbG2CeM-eBut1YfWD-DufeisMJR-rJrxR7", "public": false, "with_anchors": true } and it priints: { "data": { "error": "Failed to connect to peer", "code": 500 } } But I have connected peer before(call connectpeer, and no errors print out), so I don't know what happens.
That's strange indeed. Are you sure the peer_pubkey_and_addr
parameter is correct? Is the other node actually listening on the 9735 port? Could you retry after restarting the nodes?
Hi @zoedberg , I have a new question here, I execute the following steps: 1.create 4 utxo 2.get rgb invoice by asset id 3.decode the rgb invoice that obtained by step 2 4.send rgb asset, then in this step, I meet this error: "data": { "error": "Unexpected error", "code": 500 } So, do I miss any steps here?
This seems the same question made in #16. Also, in this issue I was waiting for your answer to:
That's strange indeed. Are you sure the peer_pubkey_and_addr parameter is correct? Is the other node actually listening on the 9735 port? Could you retry after restarting the nodes?
Are you planning on following up? Otherwise we can close the issue
Yes, you can close the issue, and if I meet a new question, I will open a new issue, thx.
Hi there, I run the following steps: 1.create utxo for rgb assets 2.create a lightning invoice 3.decode ln invoice to get the p2p public key 4.use public key to connect peers, it works 5.then use public key to open the channel, it failed. How can I fix this? Another question, when I create a RGB invoice, can I call sendasset directly, or I must first connect peer, then open the channel, and finally send asset?