Closed roeierez closed 8 months ago
I think the close_to address is only used on mutual close. It should still be useful to set, but just noting it's not a silver bullet for all your onchain funds.
I think there are 3 ways in the SDK interface we could add this:
close_to_addr
field in the configset_close_to_address
receive_payment
/ receive_onchain
Any of these approaches would have to serialize a gl_config message and write it to the datastore.
As much as I would prefer not to add SDK methods, I think it puts less burden of the user/vendor to store a close_to_addr and use it in the config or pass each time to receive_payment / receive_onchain
I agree adding a method seems like most fit here. Using the config is a problem since it can only be used when the sdk connects. Although perhaps we can mimic GL here and add a method setNodeConfig? Or you think it is going to be confusing with the current config? Just looking for a way not to add methods when gl adds more parameters to their node config.
It might work set_node_config(NodeConfigRequest req)
. But maybe it might be confusing as there is already a NodeConfig for passing the node credentials.
This address is the channel closure address where the funds are swept to. GL supports this: https://github.com/Blockstream/greenlight/blob/6ab8f3205639ddf611f99e71691f7515fc0d24e6/libs/proto/greenlight.proto#L55C16-L55C24