-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit adds a new project for calling c-lightning from .NET in a typesafe way. Most of the codes are auto-generated from client generator built in ref: ElementsProject/lightning#5201 It must be updated after ElementsProject/lightning#5216 gets merged. So that all the generation logics is defined in this repo. But this is good enough for temporary solution.
- Loading branch information
1 parent
5667b5c
commit 3ac1446
Showing
5 changed files
with
3,534 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
|
||
/// This file was automatically generated using following command: | ||
/// ```bash | ||
/// msggen | ||
/// ``` | ||
/// | ||
/// Do not edit this file, it'll be overwritten. Rather edit the schema that | ||
/// This file was generated from | ||
namespace DotNetLightning.ClnRpc | ||
|
||
|
||
open System.Runtime.InteropServices | ||
open System.Runtime.CompilerServices | ||
open System.Threading | ||
open System.Threading.Tasks | ||
|
||
|
||
|
||
[<System.CodeDom.Compiler.GeneratedCode("msggen", "")>] | ||
[<Extension;AbstractClass;Sealed>] | ||
type ClnClientExtensions = | ||
[<Extension>] | ||
static member GetinfoAsync(this: ClnClient, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync<Responses.GetinfoResponse>("getinfo", null, ct=ct) | ||
[<Extension>] | ||
static member ListPeersAsync(this: ClnClient, req: Requests.ListpeersRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync<Responses.ListpeersResponse>(Request.ListPeers req, ct=ct) | ||
[<Extension>] | ||
static member ListFundsAsync(this: ClnClient, req: Requests.ListfundsRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync<Responses.ListfundsResponse>(Request.ListFunds req, ct=ct) | ||
[<Extension>] | ||
static member SendPayAsync(this: ClnClient, req: Requests.SendpayRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync<Responses.SendpayResponse>(Request.SendPay req, ct=ct) | ||
[<Extension>] | ||
static member ListChannelsAsync(this: ClnClient, req: Requests.ListchannelsRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync<Responses.ListchannelsResponse>(Request.ListChannels req, ct=ct) | ||
[<Extension>] | ||
static member AddGossipAsync(this: ClnClient, req: Requests.AddgossipRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync(Request.AddGossip req, ct=ct) :> Task | ||
[<Extension>] | ||
static member AutoCleanInvoiceAsync(this: ClnClient, req: Requests.AutocleaninvoiceRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync<Responses.AutocleaninvoiceResponse>(Request.AutoCleanInvoice req, ct=ct) | ||
[<Extension>] | ||
static member CheckMessageAsync(this: ClnClient, req: Requests.CheckmessageRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync<Responses.CheckmessageResponse>(Request.CheckMessage req, ct=ct) | ||
[<Extension>] | ||
static member CloseAsync(this: ClnClient, req: Requests.CloseRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync<Responses.CloseResponse>(Request.Close req, ct=ct) | ||
[<Extension>] | ||
static member ConnectPeerAsync(this: ClnClient, req: Requests.ConnectRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync<Responses.ConnectResponse>(Request.ConnectPeer req, ct=ct) | ||
[<Extension>] | ||
static member CreateInvoiceAsync(this: ClnClient, req: Requests.CreateinvoiceRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync<Responses.CreateinvoiceResponse>(Request.CreateInvoice req, ct=ct) | ||
[<Extension>] | ||
static member DatastoreAsync(this: ClnClient, req: Requests.DatastoreRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync<Responses.DatastoreResponse>(Request.Datastore req, ct=ct) | ||
[<Extension>] | ||
static member CreateOnionAsync(this: ClnClient, req: Requests.CreateonionRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync<Responses.CreateonionResponse>(Request.CreateOnion req, ct=ct) | ||
[<Extension>] | ||
static member DelDatastoreAsync(this: ClnClient, req: Requests.DeldatastoreRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync<Responses.DeldatastoreResponse>(Request.DelDatastore req, ct=ct) | ||
[<Extension>] | ||
static member DelExpiredInvoiceAsync(this: ClnClient, req: Requests.DelexpiredinvoiceRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync(Request.DelExpiredInvoice req, ct=ct) :> Task | ||
[<Extension>] | ||
static member DelInvoiceAsync(this: ClnClient, req: Requests.DelinvoiceRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync<Responses.DelinvoiceResponse>(Request.DelInvoice req, ct=ct) | ||
[<Extension>] | ||
static member InvoiceAsync(this: ClnClient, req: Requests.InvoiceRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync<Responses.InvoiceResponse>(Request.Invoice req, ct=ct) | ||
[<Extension>] | ||
static member ListDatastoreAsync(this: ClnClient, req: Requests.ListdatastoreRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync<Responses.ListdatastoreResponse>(Request.ListDatastore req, ct=ct) | ||
[<Extension>] | ||
static member ListInvoicesAsync(this: ClnClient, req: Requests.ListinvoicesRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync<Responses.ListinvoicesResponse>(Request.ListInvoices req, ct=ct) | ||
[<Extension>] | ||
static member SendOnionAsync(this: ClnClient, req: Requests.SendonionRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync<Responses.SendonionResponse>(Request.SendOnion req, ct=ct) | ||
[<Extension>] | ||
static member ListSendPaysAsync(this: ClnClient, req: Requests.ListsendpaysRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync<Responses.ListsendpaysResponse>(Request.ListSendPays req, ct=ct) | ||
[<Extension>] | ||
static member ListTransactionsAsync(this: ClnClient, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync<Responses.ListtransactionsResponse>("listtransactions", null, ct=ct) | ||
[<Extension>] | ||
static member PayAsync(this: ClnClient, req: Requests.PayRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync<Responses.PayResponse>(Request.Pay req, ct=ct) | ||
[<Extension>] | ||
static member ListNodesAsync(this: ClnClient, req: Requests.ListnodesRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync<Responses.ListnodesResponse>(Request.ListNodes req, ct=ct) | ||
[<Extension>] | ||
static member WaitAnyInvoiceAsync(this: ClnClient, req: Requests.WaitanyinvoiceRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync<Responses.WaitanyinvoiceResponse>(Request.WaitAnyInvoice req, ct=ct) | ||
[<Extension>] | ||
static member WaitInvoiceAsync(this: ClnClient, req: Requests.WaitinvoiceRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync<Responses.WaitinvoiceResponse>(Request.WaitInvoice req, ct=ct) | ||
[<Extension>] | ||
static member WaitSendPayAsync(this: ClnClient, req: Requests.WaitsendpayRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync<Responses.WaitsendpayResponse>(Request.WaitSendPay req, ct=ct) | ||
[<Extension>] | ||
static member NewAddrAsync(this: ClnClient, req: Requests.NewaddrRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync<Responses.NewaddrResponse>(Request.NewAddr req, ct=ct) | ||
[<Extension>] | ||
static member WithdrawAsync(this: ClnClient, req: Requests.WithdrawRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync<Responses.WithdrawResponse>(Request.Withdraw req, ct=ct) | ||
[<Extension>] | ||
static member KeySendAsync(this: ClnClient, req: Requests.KeysendRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync<Responses.KeysendResponse>(Request.KeySend req, ct=ct) | ||
[<Extension>] | ||
static member FundPsbtAsync(this: ClnClient, req: Requests.FundpsbtRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync<Responses.FundpsbtResponse>(Request.FundPsbt req, ct=ct) | ||
[<Extension>] | ||
static member SendPsbtAsync(this: ClnClient, req: Requests.SendpsbtRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync<Responses.SendpsbtResponse>(Request.SendPsbt req, ct=ct) | ||
[<Extension>] | ||
static member SignPsbtAsync(this: ClnClient, req: Requests.SignpsbtRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync<Responses.SignpsbtResponse>(Request.SignPsbt req, ct=ct) | ||
[<Extension>] | ||
static member UtxoPsbtAsync(this: ClnClient, req: Requests.UtxopsbtRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync<Responses.UtxopsbtResponse>(Request.UtxoPsbt req, ct=ct) | ||
[<Extension>] | ||
static member TxDiscardAsync(this: ClnClient, req: Requests.TxdiscardRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync<Responses.TxdiscardResponse>(Request.TxDiscard req, ct=ct) | ||
[<Extension>] | ||
static member TxPrepareAsync(this: ClnClient, req: Requests.TxprepareRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync<Responses.TxprepareResponse>(Request.TxPrepare req, ct=ct) | ||
[<Extension>] | ||
static member TxSendAsync(this: ClnClient, req: Requests.TxsendRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync<Responses.TxsendResponse>(Request.TxSend req, ct=ct) | ||
[<Extension>] | ||
static member DisconnectAsync(this: ClnClient, req: Requests.DisconnectRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync(Request.Disconnect req, ct=ct) :> Task | ||
[<Extension>] | ||
static member FeeratesAsync(this: ClnClient, req: Requests.FeeratesRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync<Responses.FeeratesResponse>(Request.Feerates req, ct=ct) | ||
[<Extension>] | ||
static member GetRouteAsync(this: ClnClient, req: Requests.GetrouteRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync<Responses.GetrouteResponse>(Request.GetRoute req, ct=ct) | ||
[<Extension>] | ||
static member ListForwardsAsync(this: ClnClient, req: Requests.ListforwardsRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync<Responses.ListforwardsResponse>(Request.ListForwards req, ct=ct) | ||
[<Extension>] | ||
static member ListPaysAsync(this: ClnClient, req: Requests.ListpaysRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync<Responses.ListpaysResponse>(Request.ListPays req, ct=ct) | ||
[<Extension>] | ||
static member PingAsync(this: ClnClient, req: Requests.PingRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync<Responses.PingResponse>(Request.Ping req, ct=ct) | ||
[<Extension>] | ||
static member SignMessageAsync(this: ClnClient, req: Requests.SignmessageRequest, [<Optional;DefaultParameterValue(CancellationToken())>] ct: CancellationToken) = | ||
this.SendCommandAsync<Responses.SignmessageResponse>(Request.SignMessage req, ct=ct) |
Oops, something went wrong.