Bitgold stock analysis
31 commentsNushares blockchain university
It is intended for those who already understand how to work with LND. If this is your first time or you need a refresher, you may consider perusing our LND developer site featuring a tutorial, resources and guides at dev. If you prefer to just read code, the original rpc. Lastly, keep in mind that the code examples will differ slightly based on your operating system and specific setup. 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.
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. WalletBalance returns total unspent outputs confirmed and unconfirmed , all confirmed unspent outputs and all unconfirmed unspent outputs under control of the wallet.
SendCoins executes a request to send coins to a particular address. 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. SendMany handles a request for a transaction that creates multiple specified outputs in parallel. AddressType has to be one of: The returned signature string is zbase32 encoded and pubkey recoverable, meaning that only the message digest and signature are needed for verification.
VerifyMessage verifies a signature over a msg. In addition to returning the validity of the signature, VerifyMessage also returns the recovered pubkey from the signature. 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. 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. 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.
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. 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. 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. A single RPC invocation creates a persistent bi-directional stream allowing clients to rapidly send payments through the Lightning Network with a single persistent connection. A path through the channel graph which runs over one or more channels in succession. This struct carries all the information required to craft the Sphinx onion packet, and send the payment along the first hop in the path.
A route is only selected as valid if all the channels have sufficient capacity to carry the initial payment amount after fees are accounted for.
SendPaymentSync is the synchronous non-streaming version of SendPayment. 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. ListInvoices returns a list of all the invoices currently stored within the database. Any active debug invoices are ignored. 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.
DecodePayReq takes an encoded payment request string and attempts to decode it, returning a full description of the conditions encoded within the payment request. 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: As this is a directed graph, the edges also contain the node directional specific routing policy which includes: A node is connected to other nodes by one or more channel edges emanating from it.
As the graph is directed, a node will also have an incoming edge attached to it for each outgoing edge. A fully authenticated channel along with all its unique attributes.
Once an authenticated channel announcement has been processed on the network, then a instance of ChannelEdgeInfo encapsulating the channels attributes is stored. The other portions relevant to routing policy of a channel are stored within a ChannelEdgePolicy for each direction of the channel. GetChanInfo returns the latest authenticated network announcement for the given channel identified by its channel ID: GetNodeInfo returns the latest advertised, aggregated, and authenticated channel information for the specified node identified by its public key.
The retuned 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.
GetNetworkInfo returns some basic stats about the known channel graph from the point of view of the node. StopDaemon will send a shutdown request to the interrupt handler, triggering a graceful shutdown of the daemon. 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. 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.
FeeReport allows the caller to obtain a report detailing the current fee schedule enforced by the node globally for each channel. UpdateChannelPolicy allows the caller to update the fee schedule and channel policies for all channels globally, or a particular channel.
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. Back to Developer Site shell python javascript. If not specified, then a fresh set of randomness will be used to create the seed. This field is optional, as if not provided, then the daemon will generate a new cipher seed for the user. Otherwise, then the daemon will attempt to recover the wallet state linked to this cipher seed.
This is the raw cipher text before run through our mnemonic encoding scheme. InitWallet Simple RPC InitWallet is used when lnd is starting up for the first time to fully initialize the daemon and its internal wallet. This MUST be at least 8 chars in length.
After creation, this password is required to unlock the daemon. This may have been generated by the GenSeed method, or be an existing seed. InitWalletResponse This response is empty. The unlock command is used to decrypt lnd's wallet state in order to start up. This command MUST be run after booting up lnd before it's able to carry out its duties. An exception is if a user is running with --noencryptwallet, then a default passphrase will be used.
This will be required to decrypt on-disk material that the daemon requires to function properly. UnlockWalletResponse This response is empty. WalletBalance Simple RPC WalletBalance returns total unspent outputs confirmed and unconfirmed , all confirmed unspent outputs and all unconfirmed unspent outputs under control of the wallet.
WalletBalanceRequest This request has no parameters. ChannelBalanceRequest This request has no parameters. List all transactions an address of the wallet was involved in. GetTransactionsRequest This request has no parameters.
Send amt coins in satoshis to the BASE58 encoded bitcoin address addr. Positional arguments and flags can be used interchangeably but not at the same time!
SendCoinsResponse Field Type Label Description txid string optional The transaction ID of the transaction SubscribeTransactions Response-streaming RPC 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. Create and broadcast a transaction paying the specified amount s to the passed address es.
The send-json-string' param decodes addresses and the amount to send respectively in the following format: