Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for lnd v0.9.0 #71

Merged
merged 8 commits into from
Jan 24, 2020
Merged

support for lnd v0.9.0 #71

merged 8 commits into from
Jan 24, 2020

Conversation

KayBeSee
Copy link
Contributor

Adds support for lnd v0.9.0

@@ -1,5 +1,6 @@
import { HTLCAttempt } from '../generated/rpc_pb';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not import from generated types

}

export interface PaymentStatusUpdate {
export interface PaymentStatus {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was called PaymentStatusUpdate to avoid changing the PaymentStatus enum name

amt: number;
chanPoint?: ChannelPoint;
localKey?: KeyDescriptor;
remoteKey?: Uint8Array | string;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uint8Array | string; -> Buffer | string;

chanPoint?: ChannelPoint;
localKey?: KeyDescriptor;
remoteKey?: Uint8Array | string;
pendingChanId?: Uint8Array | string;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uint8Array | string; -> Buffer | string;

finalCltvDelta?: number;
feeLimit?: FeeLimit;
ignoredNodes?: Buffer[] | string[];
ignoredEdges?: EdgeLocator[];
sourcePubKey?: string;
useMissionControl?: boolean;
ignoredPairs?: NodePair[];
cltvLimit?: number;
destCustomRecordsMap?: Array<[number, Uint8Array]> | string[];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Array<[number, Uint8Array]> | string[]; -> Array<[number, Buffer]> | string[];

cltvLimit?: number;
routeHints?: RouteHint[];
destTlvMap?: Array<[number, Buffer | string]>;
destCustomRecordsMap?: Array<[number, Uint8Array]> | string[];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Array<[number, Uint8Array]> | string[]; -> Array<[number, Buffer]> | string[];

@cavanmflynn
Copy link
Contributor

The ln-rpc types are missing some new RPC methods & types: subscribePeerEvents, fundingStateStep, bakeMacaroon, etc.

@KayBeSee
Copy link
Contributor Author

Updated!

* the client in which any events relevant to the state of peers are sent
* over. Events include peers going online and offline.
*/
subscribePeerEvents(PeerEventSubscription): Promise<PeerEvent>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a streaming method. The return type should be Readable<PeerEvent>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also the param should args?: {}

* Alternatively, this can be used to interactively drive PSBT signing for
* funding for partially complete funding transactions.
*/
fundingStateStep(FundingTransitionMsg): Promise<FundingStateStepResp>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Param should be args?: FundingTransitionMsg

@cavanmflynn
Copy link
Contributor

Remove package-lock.json

@cavanmflynn
Copy link
Contributor

Any subscription method names will have to be added to the correct subscriptionMethods array as well (services folder).

@KayBeSee
Copy link
Contributor Author

Good call, I didn't realize that about the streaming methods. Updated with feedback.

@KayBeSee
Copy link
Contributor Author

Updated with some props that were removed accidentally in previous commits.

@cavanmflynn cavanmflynn merged commit af8366b into master Jan 24, 2020
@cavanmflynn cavanmflynn deleted the km-lnd-v0.9.0 branch January 24, 2020 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants