orb.lnd.lnd_rest module

class orb.lnd.lnd_rest.LndREST(tls_certificate, server, macaroon, port)

Bases: LndBase

batch_open(pubkeys, amounts, sat_per_vbyte)

lncli: batchopenchannel BatchOpenChannel attempts to open multiple single-funded channels in a single transaction in an atomic way. This means either all channel open requests succeed at once or all attempts are aborted if any of them fail. This is the safer variant of using PSBTs to manually fund a batch of channels through the OpenChannel RPC.

channel_balance()
close_channel(channel_point: str, force: bool, sat_per_vbyte: int)
connect(addr)

lncli: connect 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.

Lnd().connect(address) gives an error in REST.. strangely it connects successfully, and the error can be ignored.

decode_payment_request(payment_request)
fee_report()
property fqdn
generate_invoice(amount, memo: str = 'Orb invoice')
get_balance()
get_channel_events()
get_channels(active_only=False)
get_edge(channel_id)
get_forwarding_history(start_time=None, end_time=None, index_offset=0, num_max_events=100)
get_htlc_events()
get_info()
get_invoice_events()
get_node_alias(pub_key)
get_node_info(pub_key)
get_own_pubkey()
get_pending_channels()
get_policy_from(channel_id)
get_policy_to(channel_id)
get_route(pub_key, amount_sat, ignored_pairs, ignored_nodes, last_hop_pubkey, outgoing_chan_id, fee_limit_msat, time_pref=0, source_pub_key=None)

https://github.com/lightningnetwork/lnd/issues/6133

keysend(target_pubkey, msg, amount, fee_limit, timeout)
list_invoices()
list_payments(index_offset=0, max_payments=100)
list_peers()

Return list of peers

new_address()

lncli: newaddress NewAddress creates a new address under control of the local wallet.

open_channel(node_pubkey_string, sat_per_vbyte, amount_sat)

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.

router_send(pub_key, amount, payment_request, last_hop_pubkey, outgoing_chan_id, fee_limit_msat, payment_request_raw)

SendPaymentV2 attempts to route a payment described by the passed PaymentRequest to the final destination. The call returns a stream of payment updates.

Does not allow for self-payment.

send_coins(addr: str, satoshi: int, sat_per_vbyte: int, send_all: bool = False)

lncli: sendcoins 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_vbyte are set, then the internal wallet will consult its fee model to determine a fee for the default confirmation target.

send_payment(payment_request, route)

SendToRouteV2 attempts to make a payment via the specified route. This method differs from SendPayment in that it allows users to specify a full route manually. This can be used for things like rebalancing, and atomic swaps.

sign_message(msg)

SignMessage signs a message with the key specified in the key locator. The returned signature is fixed-size LN wire format encoded.

The main difference to SignMessage in the main RPC is that a specific key is used to sign the message instead of the node identity private key.

update_channel_policy(channel, **kwargs)
orb.lnd.lnd_rest.encode_pk(PK)