Closed krtk6160 closed 3 years ago
it has it but there is a doc issue where it isn't listed
Here is the proper event doc:
@event 'forward'
{
at: <Forward Update At ISO 8601 Date String>
[external_failure]: <Public Failure Reason String>
[fee]: <Fee Tokens Charged Number>
[fee_mtokens]: <Fee Millitokens Charged String>
[in_channel]: <Inbound Standard Format Channel Id String>
[in_payment]: <Inbound Channel Payment Id Number>
[internal_failure]: <Private Failure Reason String>
is_confirmed: <Forward Is Confirmed Bool>
is_failed: <Forward Is Failed Bool>
is_receive: <Is Receive Bool>
is_send: <Is Send Bool>
[mtokens]: <Sending Millitokens Number>
[out_channel]: <Outgoing Standard Format Channel Id String>
[out_payment]: <Outgoing Channel Payment Id Number>
[timeout]: <Forward Timeout at Height Number>
[tokens]: <Sending Tokens Number>
}
Here is the proper event doc:
@event 'forward' { at: <Forward Update At ISO 8601 Date String> [external_failure]: <Public Failure Reason String> [fee]: <Fee Tokens Charged Number> [fee_mtokens]: <Fee Millitokens Charged String> [in_channel]: <Inbound Standard Format Channel Id String> [in_payment]: <Inbound Channel Payment Id Number> [internal_failure]: <Private Failure Reason String> is_confirmed: <Forward Is Confirmed Bool> is_failed: <Forward Is Failed Bool> is_receive: <Is Receive Bool> is_send: <Is Send Bool> [mtokens]: <Sending Millitokens Number> [out_channel]: <Outgoing Standard Format Channel Id String> [out_payment]: <Outgoing Channel Payment Id Number> [timeout]: <Forward Timeout at Height Number> [tokens]: <Sending Tokens Number> }
Oh okay. Thanks.
I am assuming the event output is same for the subscribeToForwards
method in https://github.com/alexbosworth/lightning as well?
The method itself is imported from the other repo so it is identical - the other repo also has typescript support but the type definitions there also need to be updated for the missing fields, working on that
The doc above is wrong about the mtokens
value, this should be a string not a number
Okay thanks.
I'll fix this doc and types in an upcoming release in both places, working on that
Feature request:
The subscribeToForwards subscription would be more useful if it also output the incoming and outgoing token/mtokens amounts. I assume it relies on the subscribeHtlcEvents api from LND which already exposes this information.