Add LND test wallet
This commit is contained in:
1
Lndmobile.framework/Headers
Symbolic link
1
Lndmobile.framework/Headers
Symbolic link
@ -0,0 +1 @@
|
||||
Versions/Current/Headers
|
1
Lndmobile.framework/Lndmobile
Symbolic link
1
Lndmobile.framework/Lndmobile
Symbolic link
@ -0,0 +1 @@
|
||||
Versions/Current/Lndmobile
|
1
Lndmobile.framework/Modules
Symbolic link
1
Lndmobile.framework/Modules
Symbolic link
@ -0,0 +1 @@
|
||||
Versions/Current/Modules
|
1
Lndmobile.framework/Resources
Symbolic link
1
Lndmobile.framework/Resources
Symbolic link
@ -0,0 +1 @@
|
||||
Versions/Current/Resources
|
13
Lndmobile.framework/Versions/A/Headers/Lndmobile.h
Normal file
13
Lndmobile.framework/Versions/A/Headers/Lndmobile.h
Normal file
@ -0,0 +1,13 @@
|
||||
|
||||
// Objective-C API for talking to the following Go packages
|
||||
//
|
||||
// github.com/lightningnetwork/lnd/mobile
|
||||
//
|
||||
// File is generated by gomobile bind. Do not edit.
|
||||
#ifndef __Lndmobile_FRAMEWORK_H__
|
||||
#define __Lndmobile_FRAMEWORK_H__
|
||||
|
||||
#include "Lndmobile.objc.h"
|
||||
#include "Universe.objc.h"
|
||||
|
||||
#endif
|
839
Lndmobile.framework/Versions/A/Headers/Lndmobile.objc.h
Normal file
839
Lndmobile.framework/Versions/A/Headers/Lndmobile.objc.h
Normal file
@ -0,0 +1,839 @@
|
||||
// Objective-C API for talking to github.com/lightningnetwork/lnd/mobile Go package.
|
||||
// gobind -lang=objc github.com/lightningnetwork/lnd/mobile
|
||||
//
|
||||
// File is generated by gobind. Do not edit.
|
||||
|
||||
#ifndef __Lndmobile_H__
|
||||
#define __Lndmobile_H__
|
||||
|
||||
@import Foundation;
|
||||
#include "ref.h"
|
||||
#include "Universe.objc.h"
|
||||
|
||||
|
||||
@protocol LndmobileCallback;
|
||||
@class LndmobileCallback;
|
||||
@protocol LndmobileRecvStream;
|
||||
@class LndmobileRecvStream;
|
||||
@protocol LndmobileSendStream;
|
||||
@class LndmobileSendStream;
|
||||
|
||||
@protocol LndmobileCallback <NSObject>
|
||||
- (void)onError:(NSError* _Nullable)p0;
|
||||
- (void)onResponse:(NSData* _Nullable)p0;
|
||||
@end
|
||||
|
||||
@protocol LndmobileRecvStream <NSObject>
|
||||
- (void)onError:(NSError* _Nullable)p0;
|
||||
- (void)onResponse:(NSData* _Nullable)p0;
|
||||
@end
|
||||
|
||||
@protocol LndmobileSendStream <NSObject>
|
||||
- (BOOL)send:(NSData* _Nullable)p0 error:(NSError* _Nullable* _Nullable)error;
|
||||
- (BOOL)stop:(NSError* _Nullable* _Nullable)error;
|
||||
@end
|
||||
|
||||
/**
|
||||
* AbandonChannel removes all channel state from the database except for a
|
||||
close summary. This method can be used to get rid of permanently unusable
|
||||
channels due to bugs fixed in newer versions of lnd. This method can also be
|
||||
used to remove externally funded channels where the funding transaction was
|
||||
never broadcast. Only available for non-externally funded channels in dev
|
||||
build.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileAbandonChannel(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* AddInvoice attempts to add a new invoice to the invoice database. Any
|
||||
duplicated invoices are rejected, therefore all invoices *must* have a
|
||||
unique payment preimage.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileAddInvoice(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* BakeMacaroon allows the creation of a new macaroon with custom read and
|
||||
write permissions. No first-party caveats are added since this can be done
|
||||
offline.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileBakeMacaroon(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* ChangePassword changes the password of the encrypted wallet. This will
|
||||
automatically unlock the wallet database if successful.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileChangePassword(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* ChannelAcceptor dispatches a bi-directional streaming RPC in which
|
||||
OpenChannel requests are sent to the client and the client responds with
|
||||
a boolean that tells LND whether or not to accept the channel. This allows
|
||||
node operators to specify their own criteria for accepting inbound channels
|
||||
through a single persistent connection.
|
||||
|
||||
NOTE: This method produces a stream of responses, and the receive stream can
|
||||
be called zero or more times. After EOF error is returned, no more responses
|
||||
will be produced. The send stream can accept zero or more requests before it
|
||||
is closed.
|
||||
*/
|
||||
FOUNDATION_EXPORT id<LndmobileSendStream> _Nullable LndmobileChannelAcceptor(id<LndmobileRecvStream> _Nullable rStream, NSError* _Nullable* _Nullable error);
|
||||
|
||||
/**
|
||||
* ChannelBalance returns the total funds available across all open channels
|
||||
in satoshis.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileChannelBalance(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* CloseChannel attempts to close an active channel identified by its channel
|
||||
outpoint (ChannelPoint). The actions of this method can additionally be
|
||||
augmented to attempt a force close after a timeout period in the case of an
|
||||
inactive peer. If a non-force close (cooperative closure) is requested,
|
||||
then the user can specify either a target number of blocks until the
|
||||
closure transaction is confirmed, or a manual fee rate. If neither are
|
||||
specified, then a default lax, block confirmation target is used.
|
||||
|
||||
NOTE: This method produces a stream of responses, and the receive stream can
|
||||
be called zero or more times. After EOF error is returned, no more responses
|
||||
will be produced.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileCloseChannel(NSData* _Nullable msg, id<LndmobileRecvStream> _Nullable rStream);
|
||||
|
||||
/**
|
||||
* ClosedChannels returns a description of all the closed channels that
|
||||
this node was a participant in.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileClosedChannels(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* ConnectPeer attempts to establish a connection to a remote peer. This is at
|
||||
the networking level, and is used for communication between nodes. This is
|
||||
distinct from establishing a channel with a peer.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileConnectPeer(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* DebugLevel allows a caller to programmatically set the logging verbosity of
|
||||
lnd. The logging can be targeted according to a coarse daemon-wide logging
|
||||
level, or in a granular fashion to specify the logging for a target
|
||||
sub-system.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileDebugLevel(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* DecodePayReq takes an encoded payment request string and attempts to decode
|
||||
it, returning a full description of the conditions encoded within the
|
||||
payment request.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileDecodePayReq(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* DeleteAllPayments deletes all outgoing payments from DB.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileDeleteAllPayments(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* DescribeGraph returns a description of the latest graph state from the
|
||||
point of view of the node. The graph information is partitioned into two
|
||||
components: all the nodes/vertexes, and all the edges that connect the
|
||||
vertexes themselves. As this is a directed graph, the edges also contain
|
||||
the node directional specific routing policy which includes: the time lock
|
||||
delta, fee information, etc.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileDescribeGraph(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* DisconnectPeer attempts to disconnect one peer from another identified by a
|
||||
given pubKey. In the case that we currently have a pending or active channel
|
||||
with the target peer, then this action will be not be allowed.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileDisconnectPeer(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* EstimateFee asks the chain backend to estimate the fee rate and total fees
|
||||
for a transaction that pays to multiple specified outputs.
|
||||
|
||||
When using REST, the `AddrToAmount` map type can be set by appending
|
||||
`&AddrToAmount[<address>]=<amount_to_send>` to the URL. Unfortunately this
|
||||
map type doesn't appear in the REST API documentation because of a bug in
|
||||
the grpc-gateway library.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileEstimateFee(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* ExportAllChannelBackups returns static channel backups for all existing
|
||||
channels known to lnd. A set of regular singular static channel backups for
|
||||
each channel are returned. Additionally, a multi-channel backup is returned
|
||||
as well, which contains a single encrypted blob containing the backups of
|
||||
each channel.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileExportAllChannelBackups(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* ExportChannelBackup attempts to return an encrypted static channel backup
|
||||
for the target channel identified by it channel point. The backup is
|
||||
encrypted with a key generated from the aezeed seed of the user. The
|
||||
returned backup can either be restored using the RestoreChannelBackup
|
||||
method once lnd is running, or via the InitWallet and UnlockWallet methods
|
||||
from the WalletUnlocker service.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileExportChannelBackup(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* FeeReport allows the caller to obtain a report detailing the current fee
|
||||
schedule enforced by the node globally for each channel.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileFeeReport(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* ForwardingHistory allows the caller to query the htlcswitch for a record of
|
||||
all HTLCs forwarded within the target time range, and integer offset
|
||||
within that time range. If no time-range is specified, then the first chunk
|
||||
of the past 24 hrs of forwarding history are returned.
|
||||
|
||||
A list of forwarding events are returned. The size of each forwarding event
|
||||
is 40 bytes, and the max message size able to be returned in gRPC is 4 MiB.
|
||||
As a result each message can only contain 50k entries. Each response has
|
||||
the index offset of the last entry. The index offset can be provided to the
|
||||
request to allow the caller to skip a series of records.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileForwardingHistory(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* FundingStateStep is an advanced funding related call that allows the caller
|
||||
to either execute some preparatory steps for a funding workflow, or
|
||||
manually progress a funding workflow. The primary way a funding flow is
|
||||
identified is via its pending channel ID. As an example, this method can be
|
||||
used to specify that we're expecting a funding flow for a particular
|
||||
pending channel ID, for which we need to use specific parameters.
|
||||
Alternatively, this can be used to interactively drive PSBT signing for
|
||||
funding for partially complete funding transactions.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileFundingStateStep(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* GenSeed is the first method that should be used to instantiate a new lnd
|
||||
instance. This method allows a caller to generate a new aezeed cipher seed
|
||||
given an optional passphrase. If provided, the passphrase will be necessary
|
||||
to decrypt the cipherseed to expose the internal wallet seed.
|
||||
|
||||
Once the cipherseed is obtained and verified by the user, the InitWallet
|
||||
method should be used to commit the newly generated seed, and create the
|
||||
wallet.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileGenSeed(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* GetChanInfo returns the latest authenticated network announcement for the
|
||||
given channel identified by its channel ID: an 8-byte integer which
|
||||
uniquely identifies the location of transaction's funding output within the
|
||||
blockchain.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileGetChanInfo(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* GetInfo returns general information concerning the lightning node including
|
||||
it's identity pubkey, alias, the chains it is connected to, and information
|
||||
concerning the number of open+pending channels.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileGetInfo(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* GetNetworkInfo returns some basic stats about the known channel graph from
|
||||
the point of view of the node.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileGetNetworkInfo(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* GetNodeInfo returns the latest advertised, aggregated, and authenticated
|
||||
channel information for the specified node identified by its public key.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileGetNodeInfo(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* GetNodeMetrics returns node metrics calculated from the graph. Currently
|
||||
the only supported metric is betweenness centrality of individual nodes.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileGetNodeMetrics(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* GetRecoveryInfo returns information concerning the recovery mode including
|
||||
whether it's in a recovery mode, whether the recovery is finished, and the
|
||||
progress made so far.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileGetRecoveryInfo(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* GetTransactions returns a list describing all the known transactions
|
||||
relevant to the wallet.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileGetTransactions(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* InitWallet is used when lnd is starting up for the first time to fully
|
||||
initialize the daemon and its internal wallet. At the very least a wallet
|
||||
password must be provided. This will be used to encrypt sensitive material
|
||||
on disk.
|
||||
|
||||
In the case of a recovery scenario, the user can also specify their aezeed
|
||||
mnemonic and passphrase. If set, then the daemon will use this prior state
|
||||
to initialize its internal wallet.
|
||||
|
||||
Alternatively, this can be used along with the GenSeed RPC to obtain a
|
||||
seed, then present it to the user. Once it has been verified by the user,
|
||||
the seed can be fed into this RPC in order to commit the new wallet.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileInitWallet(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* ListChannels returns a description of all the open channels that this node
|
||||
is a participant in.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileListChannels(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* ListInvoices returns a list of all the invoices currently stored within the
|
||||
database. Any active debug invoices are ignored. It has full support for
|
||||
paginated responses, allowing users to query for specific invoices through
|
||||
their add_index. This can be done by using either the first_index_offset or
|
||||
last_index_offset fields included in the response as the index_offset of the
|
||||
next request. By default, the first 100 invoices created will be returned.
|
||||
Backwards pagination is also supported through the Reversed flag.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileListInvoices(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* ListPayments returns a list of all outgoing payments.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileListPayments(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* ListPeers returns a verbose listing of all currently active peers.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileListPeers(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* ListPermissions lists all RPC method URIs and their required macaroon
|
||||
permissions to access them.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileListPermissions(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileListUnspent(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* LookupInvoice attempts to look up an invoice according to its payment hash.
|
||||
The passed payment hash *must* be exactly 32 bytes, if not, an error is
|
||||
returned.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileLookupInvoice(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* ModifyStatus is used to modify the status of the autopilot agent, like
|
||||
enabling or disabling it.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileModifyStatus(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* NewAddress creates a new address under control of the local wallet.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileNewAddress(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* OpenChannel attempts to open a singly funded channel specified in the
|
||||
request to a remote peer. Users are able to specify a target number of
|
||||
blocks that the funding transaction should be confirmed in, or a manual fee
|
||||
rate to us for the funding transaction. If neither are specified, then a
|
||||
lax block confirmation target is used. Each OpenStatusUpdate will return
|
||||
the pending channel ID of the in-progress channel. Depending on the
|
||||
arguments specified in the OpenChannelRequest, this pending channel ID can
|
||||
then be used to manually progress the channel funding flow.
|
||||
|
||||
NOTE: This method produces a stream of responses, and the receive stream can
|
||||
be called zero or more times. After EOF error is returned, no more responses
|
||||
will be produced.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileOpenChannel(NSData* _Nullable msg, id<LndmobileRecvStream> _Nullable rStream);
|
||||
|
||||
/**
|
||||
* OpenChannelSync is a synchronous version of the OpenChannel RPC call. This
|
||||
call is meant to be consumed by clients to the REST proxy. As with all
|
||||
other sync calls, all byte slices are intended to be populated as hex
|
||||
encoded strings.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileOpenChannelSync(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* PendingChannels returns a list of all the channels that are currently
|
||||
considered "pending". A channel is pending if it has finished the funding
|
||||
workflow and is waiting for confirmations for the funding txn, or is in the
|
||||
process of closure, either initiated cooperatively or non-cooperatively.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobilePendingChannels(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* QueryRoutes attempts to query the daemon's Channel Router for a possible
|
||||
route to a target destination capable of carrying a specific amount of
|
||||
satoshis. The returned route contains the full details required to craft and
|
||||
send an HTLC, also including the necessary information that should be
|
||||
present within the Sphinx packet encapsulated within the HTLC.
|
||||
|
||||
When using REST, the `dest_custom_records` map type can be set by appending
|
||||
`&dest_custom_records[<record_number>]=<record_data_base64_url_encoded>`
|
||||
to the URL. Unfortunately this map type doesn't appear in the REST API
|
||||
documentation because of a bug in the grpc-gateway library.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileQueryRoutes(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* QueryScores queries all available autopilot heuristics, in addition to any
|
||||
active combination of these heruristics, for the scores they would give to
|
||||
the given nodes.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileQueryScores(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* RestoreChannelBackups accepts a set of singular channel backups, or a
|
||||
single encrypted multi-chan backup and attempts to recover any funds
|
||||
remaining within the channel. If we are able to unpack the backup, then the
|
||||
new channel will be shown under listchannels, as well as pending channels.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileRestoreChannelBackups(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* SendCoins executes a request to send coins to a particular address. Unlike
|
||||
SendMany, this RPC call only allows creating a single output at a time. If
|
||||
neither target_conf, or sat_per_byte are set, then the internal wallet will
|
||||
consult its fee model to determine a fee for the default confirmation
|
||||
target.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileSendCoins(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* SendMany handles a request for a transaction that creates multiple specified
|
||||
outputs in parallel. If neither target_conf, or sat_per_byte are set, then
|
||||
the internal wallet will consult its fee model to determine a fee for the
|
||||
default confirmation target.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileSendMany(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* NOTE: This method produces a stream of responses, and the receive stream can
|
||||
be called zero or more times. After EOF error is returned, no more responses
|
||||
will be produced. The send stream can accept zero or more requests before it
|
||||
is closed.
|
||||
*/
|
||||
FOUNDATION_EXPORT id<LndmobileSendStream> _Nullable LndmobileSendPayment(id<LndmobileRecvStream> _Nullable rStream, NSError* _Nullable* _Nullable error);
|
||||
|
||||
/**
|
||||
* SendPaymentSync is the synchronous non-streaming version of SendPayment.
|
||||
This RPC is intended to be consumed by clients of the REST proxy.
|
||||
Additionally, this RPC expects the destination's public key and the payment
|
||||
hash (if any) to be encoded as hex strings.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileSendPaymentSync(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* NOTE: This method produces a stream of responses, and the receive stream can
|
||||
be called zero or more times. After EOF error is returned, no more responses
|
||||
will be produced. The send stream can accept zero or more requests before it
|
||||
is closed.
|
||||
*/
|
||||
FOUNDATION_EXPORT id<LndmobileSendStream> _Nullable LndmobileSendToRoute(id<LndmobileRecvStream> _Nullable rStream, NSError* _Nullable* _Nullable error);
|
||||
|
||||
/**
|
||||
* SendToRouteSync is a synchronous version of SendToRoute. It Will block
|
||||
until the payment either fails or succeeds.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileSendToRouteSync(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* SetScores attempts to set the scores used by the running autopilot agent,
|
||||
if the external scoring heuristic is enabled.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileSetScores(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* SignMessage signs a message with this node's private key. The returned
|
||||
signature string is `zbase32` encoded and pubkey recoverable, meaning that
|
||||
only the message digest and signature are needed for verification.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileSignMessage(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* Start starts lnd in a new goroutine.
|
||||
|
||||
extraArgs can be used to pass command line arguments to lnd that will
|
||||
override what is found in the config file. Example:
|
||||
extraArgs = "--bitcoin.testnet --lnddir=\"/tmp/folder name/\" --profile=5050"
|
||||
|
||||
The unlockerReady callback is called when the WalletUnlocker service is
|
||||
ready, and rpcReady is called after the wallet has been unlocked and lnd is
|
||||
ready to accept RPC calls.
|
||||
|
||||
NOTE: On mobile platforms the '--lnddir` argument should be set to the
|
||||
current app directory in order to ensure lnd has the permissions needed to
|
||||
write to it.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileStart(NSString* _Nullable extraArgs, id<LndmobileCallback> _Nullable unlockerReady, id<LndmobileCallback> _Nullable rpcReady);
|
||||
|
||||
/**
|
||||
* Status returns whether the daemon's autopilot agent is active.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileStatus(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* StopDaemon will send a shutdown request to the interrupt handler, triggering
|
||||
a graceful shutdown of the daemon.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileStopDaemon(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* SubscribeChannelBackups allows a client to sub-subscribe to the most up to
|
||||
date information concerning the state of all channel backups. Each time a
|
||||
new channel is added, we return the new set of channels, along with a
|
||||
multi-chan backup containing the backup info for all channels. Each time a
|
||||
channel is closed, we send a new update, which contains new new chan back
|
||||
ups, but the updated set of encrypted multi-chan backups with the closed
|
||||
channel(s) removed.
|
||||
|
||||
NOTE: This method produces a stream of responses, and the receive stream can
|
||||
be called zero or more times. After EOF error is returned, no more responses
|
||||
will be produced.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileSubscribeChannelBackups(NSData* _Nullable msg, id<LndmobileRecvStream> _Nullable rStream);
|
||||
|
||||
/**
|
||||
* SubscribeChannelEvents creates a uni-directional stream from the server to
|
||||
the client in which any updates relevant to the state of the channels are
|
||||
sent over. Events include new active channels, inactive channels, and closed
|
||||
channels.
|
||||
|
||||
NOTE: This method produces a stream of responses, and the receive stream can
|
||||
be called zero or more times. After EOF error is returned, no more responses
|
||||
will be produced.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileSubscribeChannelEvents(NSData* _Nullable msg, id<LndmobileRecvStream> _Nullable rStream);
|
||||
|
||||
/**
|
||||
* SubscribeChannelGraph launches a streaming RPC that allows the caller to
|
||||
receive notifications upon any changes to the channel graph topology from
|
||||
the point of view of the responding node. Events notified include: new
|
||||
nodes coming online, nodes updating their authenticated attributes, new
|
||||
channels being advertised, updates in the routing policy for a directional
|
||||
channel edge, and when channels are closed on-chain.
|
||||
|
||||
NOTE: This method produces a stream of responses, and the receive stream can
|
||||
be called zero or more times. After EOF error is returned, no more responses
|
||||
will be produced.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileSubscribeChannelGraph(NSData* _Nullable msg, id<LndmobileRecvStream> _Nullable rStream);
|
||||
|
||||
/**
|
||||
* SubscribeInvoices returns a uni-directional stream (server -> client) for
|
||||
notifying the client of newly added/settled invoices. The caller can
|
||||
optionally specify the add_index and/or the settle_index. If the add_index
|
||||
is specified, then we'll first start by sending add invoice events for all
|
||||
invoices with an add_index greater than the specified value. If the
|
||||
settle_index is specified, the next, we'll send out all settle events for
|
||||
invoices with a settle_index greater than the specified value. One or both
|
||||
of these fields can be set. If no fields are set, then we'll only send out
|
||||
the latest add/settle events.
|
||||
|
||||
NOTE: This method produces a stream of responses, and the receive stream can
|
||||
be called zero or more times. After EOF error is returned, no more responses
|
||||
will be produced.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileSubscribeInvoices(NSData* _Nullable msg, id<LndmobileRecvStream> _Nullable rStream);
|
||||
|
||||
/**
|
||||
* SubscribePeerEvents creates a uni-directional stream from the server to
|
||||
the client in which any events relevant to the state of peers are sent
|
||||
over. Events include peers going online and offline.
|
||||
|
||||
NOTE: This method produces a stream of responses, and the receive stream can
|
||||
be called zero or more times. After EOF error is returned, no more responses
|
||||
will be produced.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileSubscribePeerEvents(NSData* _Nullable msg, id<LndmobileRecvStream> _Nullable rStream);
|
||||
|
||||
/**
|
||||
* SubscribeTransactions creates a uni-directional stream from the server to
|
||||
the client in which any newly discovered transactions relevant to the
|
||||
wallet are sent over.
|
||||
|
||||
NOTE: This method produces a stream of responses, and the receive stream can
|
||||
be called zero or more times. After EOF error is returned, no more responses
|
||||
will be produced.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileSubscribeTransactions(NSData* _Nullable msg, id<LndmobileRecvStream> _Nullable rStream);
|
||||
|
||||
/**
|
||||
* UnlockWallet is used at startup of lnd to provide a password to unlock
|
||||
the wallet database.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileUnlockWallet(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* UpdateChannelPolicy allows the caller to update the fee schedule and
|
||||
channel policies for all channels globally, or a particular channel.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileUpdateChannelPolicy(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* VerifyChanBackup allows a caller to verify the integrity of a channel backup
|
||||
snapshot. This method will accept either a packed Single or a packed Multi.
|
||||
Specifying both will result in an error.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileVerifyChanBackup(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* VerifyMessage verifies a signature over a msg. The signature must be
|
||||
zbase32 encoded and signed by an active node in the resident node's
|
||||
channel database. In addition to returning the validity of the signature,
|
||||
VerifyMessage also returns the recovered pubkey from the signature.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileVerifyMessage(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
/**
|
||||
* WalletBalance returns total unspent outputs(confirmed and unconfirmed), all
|
||||
confirmed unspent outputs and all unconfirmed unspent outputs under control
|
||||
of the wallet.
|
||||
|
||||
NOTE: This method produces a single result or error, and the callback will
|
||||
be called only once.
|
||||
*/
|
||||
FOUNDATION_EXPORT void LndmobileWalletBalance(NSData* _Nullable msg, id<LndmobileCallback> _Nullable callback);
|
||||
|
||||
@class LndmobileCallback;
|
||||
|
||||
@class LndmobileRecvStream;
|
||||
|
||||
@class LndmobileSendStream;
|
||||
|
||||
/**
|
||||
* Callback is an interface that is passed in by callers of the library, and
|
||||
specifies where the responses should be delivered.
|
||||
*/
|
||||
@interface LndmobileCallback : NSObject <goSeqRefInterface, LndmobileCallback> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
/**
|
||||
* OnError is called by the library if any error is encountered during
|
||||
the execution of the RPC call.
|
||||
*/
|
||||
- (void)onError:(NSError* _Nullable)p0;
|
||||
/**
|
||||
* OnResponse is called by the library when a response from the daemon
|
||||
for the associated RPC call is received. The reponse is a serialized
|
||||
protobuf for the expected response, and must be deserialized by the
|
||||
caller.
|
||||
*/
|
||||
- (void)onResponse:(NSData* _Nullable)p0;
|
||||
@end
|
||||
|
||||
/**
|
||||
* RecvStream is an interface that is passed in by callers of the library, and
|
||||
specifies where the streaming responses should be delivered.
|
||||
*/
|
||||
@interface LndmobileRecvStream : NSObject <goSeqRefInterface, LndmobileRecvStream> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
/**
|
||||
* OnError is called by the library if any error is encountered during
|
||||
the execution of the RPC call, or if the response stream ends. No
|
||||
more stream responses will be received after this.
|
||||
*/
|
||||
- (void)onError:(NSError* _Nullable)p0;
|
||||
/**
|
||||
* OnResponse is called by the library when a new stream response from
|
||||
the daemon for the associated RPC call is available. The reponse is
|
||||
a serialized protobuf for the expected response, and must be
|
||||
deserialized by the caller.
|
||||
*/
|
||||
- (void)onResponse:(NSData* _Nullable)p0;
|
||||
@end
|
||||
|
||||
/**
|
||||
* SendStream is an interface that the caller of the library can use to send
|
||||
requests to the server during the execution of a bidirectional streaming RPC
|
||||
call, or stop the stream.
|
||||
*/
|
||||
@interface LndmobileSendStream : NSObject <goSeqRefInterface, LndmobileSendStream> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
/**
|
||||
* Send sends the serialized protobuf request to the server.
|
||||
*/
|
||||
- (BOOL)send:(NSData* _Nullable)p0 error:(NSError* _Nullable* _Nullable)error;
|
||||
/**
|
||||
* Stop closes the bidirecrional connection.
|
||||
*/
|
||||
- (BOOL)stop:(NSError* _Nullable* _Nullable)error;
|
||||
@end
|
||||
|
||||
#endif
|
29
Lndmobile.framework/Versions/A/Headers/Universe.objc.h
Normal file
29
Lndmobile.framework/Versions/A/Headers/Universe.objc.h
Normal file
@ -0,0 +1,29 @@
|
||||
// Objective-C API for talking to Go package.
|
||||
// gobind -lang=objc
|
||||
//
|
||||
// File is generated by gobind. Do not edit.
|
||||
|
||||
#ifndef __Universe_H__
|
||||
#define __Universe_H__
|
||||
|
||||
@import Foundation;
|
||||
#include "ref.h"
|
||||
|
||||
@protocol Universeerror;
|
||||
@class Universeerror;
|
||||
|
||||
@protocol Universeerror <NSObject>
|
||||
- (NSString* _Nonnull)error;
|
||||
@end
|
||||
|
||||
@class Universeerror;
|
||||
|
||||
@interface Universeerror : NSError <goSeqRefInterface, Universeerror> {
|
||||
}
|
||||
@property(strong, readonly) _Nonnull id _ref;
|
||||
|
||||
- (nonnull instancetype)initWithRef:(_Nonnull id)ref;
|
||||
- (NSString* _Nonnull)error;
|
||||
@end
|
||||
|
||||
#endif
|
35
Lndmobile.framework/Versions/A/Headers/ref.h
Normal file
35
Lndmobile.framework/Versions/A/Headers/ref.h
Normal file
@ -0,0 +1,35 @@
|
||||
// Copyright 2015 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
#ifndef __GO_REF_HDR__
|
||||
#define __GO_REF_HDR__
|
||||
|
||||
#include <Foundation/Foundation.h>
|
||||
|
||||
// GoSeqRef is an object tagged with an integer for passing back and
|
||||
// forth across the language boundary. A GoSeqRef may represent either
|
||||
// an instance of a Go object, or an Objective-C object passed to Go.
|
||||
// The explicit allocation of a GoSeqRef is used to pin a Go object
|
||||
// when it is passed to Objective-C. The Go seq package maintains a
|
||||
// reference to the Go object in a map keyed by the refnum along with
|
||||
// a reference count. When the reference count reaches zero, the Go
|
||||
// seq package will clear the corresponding entry in the map.
|
||||
@interface GoSeqRef : NSObject {
|
||||
}
|
||||
@property(readonly) int32_t refnum;
|
||||
@property(strong) id obj; // NULL when representing a Go object.
|
||||
|
||||
// new GoSeqRef object to proxy a Go object. The refnum must be
|
||||
// provided from Go side.
|
||||
- (instancetype)initWithRefnum:(int32_t)refnum obj:(id)obj;
|
||||
|
||||
- (int32_t)incNum;
|
||||
|
||||
@end
|
||||
|
||||
@protocol goSeqRefInterface
|
||||
-(GoSeqRef*) _ref;
|
||||
@end
|
||||
|
||||
#endif
|
BIN
Lndmobile.framework/Versions/A/Lndmobile
Normal file
BIN
Lndmobile.framework/Versions/A/Lndmobile
Normal file
Binary file not shown.
8
Lndmobile.framework/Versions/A/Modules/module.modulemap
Normal file
8
Lndmobile.framework/Versions/A/Modules/module.modulemap
Normal file
@ -0,0 +1,8 @@
|
||||
framework module "Lndmobile" {
|
||||
header "ref.h"
|
||||
header "Lndmobile.objc.h"
|
||||
header "Universe.objc.h"
|
||||
header "Lndmobile.h"
|
||||
|
||||
export *
|
||||
}
|
6
Lndmobile.framework/Versions/A/Resources/Info.plist
Normal file
6
Lndmobile.framework/Versions/A/Resources/Info.plist
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
</dict>
|
||||
</plist>
|
1
Lndmobile.framework/Versions/Current
Symbolic link
1
Lndmobile.framework/Versions/Current
Symbolic link
@ -0,0 +1 @@
|
||||
A
|
Reference in New Issue
Block a user