walletrpc: add output leases RPCs
This commit is contained in:
4 files changed
+496
-99
No files matched your search
@@ -10,6 +10,22 @@ option go_package = "github.com/lightningnetwork/lnd/lnrpc/walletrpc";
|
||||
// WalletKit is a service that gives access to the core functionalities of the
|
||||
// daemon's wallet.
|
||||
service WalletKit {
|
||||
/*
|
||||
LeaseOutput locks an output to the given ID, preventing it from being
|
||||
available for any future coin selection attempts. The absolute time of the
|
||||
lock's expiration is returned. The expiration of the lock can be extended by
|
||||
successive invocations of this RPC. Outputs can be unlocked before their
|
||||
expiration through `ReleaseOutput`.
|
||||
*/
|
||||
rpc LeaseOutput (LeaseOutputRequest) returns (LeaseOutputResponse);
|
||||
|
||||
/*
|
||||
ReleaseOutput unlocks an output, allowing it to be available for coin
|
||||
selection if it remains unspent. The ID should match the one used to
|
||||
originally lock the output.
|
||||
*/
|
||||
rpc ReleaseOutput (ReleaseOutputRequest) returns (ReleaseOutputResponse);
|
||||
|
||||
/*
|
||||
DeriveNextKey attempts to derive the *next* key within the key family
|
||||
(account in BIP43) specified. This method should return the next external
|
||||
@@ -108,6 +124,35 @@ service WalletKit {
|
||||
returns (LabelTransactionResponse);
|
||||
}
|
||||
|
||||
message LeaseOutputRequest {
|
||||
/*
|
||||
An ID of 32 random bytes that must be unique for each distinct application
|
||||
using this RPC which will be used to bound the output lease to.
|
||||
*/
|
||||
bytes id = 1;
|
||||
|
||||
// The identifying outpoint of the output being leased.
|
||||
lnrpc.OutPoint outpoint = 2;
|
||||
}
|
||||
|
||||
message LeaseOutputResponse {
|
||||
/*
|
||||
The absolute expiration of the output lease represented as a unix timestamp.
|
||||
*/
|
||||
uint64 expiration = 1;
|
||||
}
|
||||
|
||||
message ReleaseOutputRequest {
|
||||
// The unique ID that was used to lock the output.
|
||||
bytes id = 1;
|
||||
|
||||
// The identifying outpoint of the output being released.
|
||||
lnrpc.OutPoint outpoint = 2;
|
||||
}
|
||||
|
||||
message ReleaseOutputResponse {
|
||||
}
|
||||
|
||||
message KeyReq {
|
||||
/*
|
||||
Is the key finger print of the root pubkey that this request is targeting.
|
||||
|
||||
Reference in new issue
Block a user