[mobile] Mobile RPCs#3282
Conversation
mobile/bindings.go
Outdated
There was a problem hiding this comment.
splitting the extraArgs string breaks if I want to pass a path that contains a space.
e.g. /Library/Application\ Support
There was a problem hiding this comment.
seems like it's working 🙌
haven't done a lot of testing though.
98bdf6b to
a68752c
Compare
|
@halseth didn't get a chance to review the autogenerated code :( |
|
@cfromknecht added a temp commit with the generated API! |
mobile/router_api_generated.go
Outdated
There was a problem hiding this comment.
same name & package as the SendPayment method in lightning_api_generated.go.
maybe add a prefix to the methods generated by sub-services?
There was a problem hiding this comment.
@ottosuess agree. But as @halseth suggested somewhere else, you can try setting usePrefex=1 on gen_bindings.sh
(Haven't tried though, I manually changed names)
There was a problem hiding this comment.
Made it possible to add directly to make (73cb325):
make ios tags="routerrpc" prefix=1
|
Would be cool to have a way to inject custom protoc plugins like protoc-gen-swift. At zap we have a custom "falafel" plugin to generate swift apis that i'd like to inject somehow. |
mobile/gen_bindings.sh
Outdated
There was a problem hiding this comment.
Just thought I'd mention that I didn't have this command, had to run brew install protobuf to get it. Might be worth adding it as a prerequisite to the docs.
I think this is a pro-level feature for now, so can be done by modifying |
5aded27 to
3760f29
Compare
3093a15 to
0fb59d1
Compare
Latest |
8d06494 to
742c2b5
Compare
Roasbeef
left a comment
There was a problem hiding this comment.
LGTM 🐸
The auto generated code should be removed from this diff before we merge this PR.
lnd.go
Outdated
There was a problem hiding this comment.
Could use a comment explaining what the empty function closure return value is.
There was a problem hiding this comment.
Not totally sure what you mean, but expanded the comment to note what the default return values should be: 78bc0b1
78bc0b1 to
85244f7
Compare
|
Rebased and removed generated code. Generated code can still be inspected here: https://github.com/lightningnetwork/lnd/tree/78bc0b1128edc56f5f7d095a66e3a025d6a2d89e/mobile |
valentinewallace
left a comment
There was a problem hiding this comment.
nits aside, LGTM 🍾 yay!
mobile/README.md
Outdated
There was a problem hiding this comment.
Nit: s/I order/In order
|
Should now be ready to merge |
ListenerCfg allows passing custom listeners to the main method, to be used for the wallet unlocker and rpc server. If these are set these will be used instead of the regular RPC listeners.
gen_bindings uses falafel to generate Go bindings from the lnrpc protos.
This PR adds the necessary APIs and build scripts in order to compile
lndfor mobile platforms.Building mobile libraries
Prerequisites
gomobile
Follow gomobile in order to intall
gomobileand dependencies.Remember to run
gomobile init! (otherwise thelndbuild might just hang).falafel
Install
falafel:Building
lndfor iOSBuilding
lndfor Androidmake mobilewill build both iOS and Android libs.Libraries
After the build has succeeded, the libraries will be found in
mobile/build/ios/Lndmobile.frameworkandmobile/build/android/Lndmobile.aar. Reference your platforms' SDK documentation for how to add the library to your project.API docs
TODO