Skip to content
This repository has been archived by the owner on Jan 19, 2023. It is now read-only.

Fix API Documentation typos #7

Closed
ranchalp opened this issue Nov 14, 2018 · 1 comment
Closed

Fix API Documentation typos #7

ranchalp opened this issue Nov 14, 2018 · 1 comment

Comments

@ranchalp
Copy link

ranchalp commented Nov 14, 2018

(First mentioned in: https://github.com/lightningnetwork/lnd/issues/2180)

Background

the response of openChannel and openChannelSync is not as described.

environment

lnd version 0.5.0-beta commit=a3edcf9cd537ea37a502efc91d262e7017a99e6b
Linux 4.15.0-38-generic #41-Ubuntu 2018 x86_64 x86_64 x86_64 GNU/Linux
btcd version 0.12.0-beta

Steps to reproduce

print "opening channel with bob:"
response = stub.OpenChannelSync(request, metadata=[('macaroon'), macaroon)])
print "response:",response

Expected behaviour

opening channel with bob:
response: { 
    "funding_txid_bytes": <bytes>,
    "funding_txid_str": <string>,
    "output_index": <uint32>,
}

Actual behaviour

opening channel with bob:
response: funding_txid_bytes: "\366\312\323\014\245d\232\313\013\004\001P\245\341<\002\216\017I\203\214j>ub\364~\255\301e\2275"

In fact, only funding_txid_bytes or funding_txid_str can be set at once (set as a oneof as mentioned by roasbeef), and output_index is not set unless different from 0. This should be mentioned in the documentation.

Additionally, there are multiple typos regarding the (recurring) line:

>>> response = stub.NewAddress(request, metadata=[('macaroon'), macaroon)])

There are always mismatching parenthesis when mentioning metadata[...]. This happens accross the documentation. Not a big issue but still one. Should be changed to:

metadata=[('macaroon', macaroon)])

@guggero
Copy link
Member

guggero commented Aug 25, 2020

Fixed by #16.

@guggero guggero closed this as completed Aug 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants