walletrpc: add ListLeases

This commit is contained in:
Joost Jager 2021-03-12 09:26:24 +01:00
parent b8e54fffbf
commit 9398220568
10 changed files with 411 additions and 123 deletions

View File

@ -47,6 +47,7 @@ func walletCommands() []cli.Command {
listSweepsCommand,
labelTxCommand,
releaseOutputCommand,
listLeasesCommand,
psbtCommand,
},
},
@ -599,14 +600,7 @@ func fundPsbt(ctx *cli.Context) error {
return err
}
jsonLocks := make([]*utxoLease, len(response.LockedUtxos))
for idx, lock := range response.LockedUtxos {
jsonLocks[idx] = &utxoLease{
ID: hex.EncodeToString(lock.Id),
OutPoint: NewOutPointFromProto(lock.Outpoint),
Expiration: lock.Expiration,
}
}
jsonLocks := marshallLocks(response.LockedUtxos)
printJSON(&fundPsbtResponse{
Psbt: base64.StdEncoding.EncodeToString(
@ -619,6 +613,21 @@ func fundPsbt(ctx *cli.Context) error {
return nil
}
// marshallLocks converts the rpc lease information to a more json-friendly
// format.
func marshallLocks(lockedUtxos []*walletrpc.UtxoLease) []*utxoLease {
jsonLocks := make([]*utxoLease, len(lockedUtxos))
for idx, lock := range lockedUtxos {
jsonLocks[idx] = &utxoLease{
ID: hex.EncodeToString(lock.Id),
OutPoint: NewOutPointFromProto(lock.Outpoint),
Expiration: lock.Expiration,
}
}
return jsonLocks
}
// finalizePsbtResponse is a struct that contains JSON annotations for nice
// result serialization.
type finalizePsbtResponse struct {
@ -757,3 +766,25 @@ func releaseOutput(ctx *cli.Context) error {
return nil
}
var listLeasesCommand = cli.Command{
Name: "listleases",
Usage: "Return a list of currently held leases.",
Action: actionDecorator(listLeases),
}
func listLeases(ctx *cli.Context) error {
req := &walletrpc.ListLeasesRequest{}
walletClient, cleanUp := getWalletClient(ctx)
defer cleanUp()
response, err := walletClient.ListLeases(context.Background(), req)
if err != nil {
return err
}
printJSON(marshallLocks(response.LockedUtxos))
return nil
}

View File

@ -260,6 +260,8 @@ http:
- selector: walletrpc.WalletKit.ReleaseOutput
post: "/v2/wallet/utxos/release"
body: "*"
- selector: walletrpc.WalletKit.ListLeases
post: "/v2/wallet/utxos/leases"
- selector: walletrpc.WalletKit.DeriveNextKey
post: "/v2/wallet/key/next"
body: "*"

View File

@ -1773,6 +1773,77 @@ func (m *FinalizePsbtResponse) GetRawFinalTx() []byte {
return nil
}
type ListLeasesRequest struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListLeasesRequest) Reset() { *m = ListLeasesRequest{} }
func (m *ListLeasesRequest) String() string { return proto.CompactTextString(m) }
func (*ListLeasesRequest) ProtoMessage() {}
func (*ListLeasesRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_6cc6942ac78249e5, []int{30}
}
func (m *ListLeasesRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListLeasesRequest.Unmarshal(m, b)
}
func (m *ListLeasesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListLeasesRequest.Marshal(b, m, deterministic)
}
func (m *ListLeasesRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListLeasesRequest.Merge(m, src)
}
func (m *ListLeasesRequest) XXX_Size() int {
return xxx_messageInfo_ListLeasesRequest.Size(m)
}
func (m *ListLeasesRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ListLeasesRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ListLeasesRequest proto.InternalMessageInfo
type ListLeasesResponse struct {
// The list of currently leased utxos.
LockedUtxos []*UtxoLease `protobuf:"bytes,1,rep,name=locked_utxos,json=lockedUtxos,proto3" json:"locked_utxos,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListLeasesResponse) Reset() { *m = ListLeasesResponse{} }
func (m *ListLeasesResponse) String() string { return proto.CompactTextString(m) }
func (*ListLeasesResponse) ProtoMessage() {}
func (*ListLeasesResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_6cc6942ac78249e5, []int{31}
}
func (m *ListLeasesResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListLeasesResponse.Unmarshal(m, b)
}
func (m *ListLeasesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListLeasesResponse.Marshal(b, m, deterministic)
}
func (m *ListLeasesResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListLeasesResponse.Merge(m, src)
}
func (m *ListLeasesResponse) XXX_Size() int {
return xxx_messageInfo_ListLeasesResponse.Size(m)
}
func (m *ListLeasesResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ListLeasesResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ListLeasesResponse proto.InternalMessageInfo
func (m *ListLeasesResponse) GetLockedUtxos() []*UtxoLease {
if m != nil {
return m.LockedUtxos
}
return nil
}
func init() {
proto.RegisterEnum("walletrpc.WitnessType", WitnessType_name, WitnessType_value)
proto.RegisterType((*ListUnspentRequest)(nil), "walletrpc.ListUnspentRequest")
@ -1807,126 +1878,130 @@ func init() {
proto.RegisterType((*UtxoLease)(nil), "walletrpc.UtxoLease")
proto.RegisterType((*FinalizePsbtRequest)(nil), "walletrpc.FinalizePsbtRequest")
proto.RegisterType((*FinalizePsbtResponse)(nil), "walletrpc.FinalizePsbtResponse")
proto.RegisterType((*ListLeasesRequest)(nil), "walletrpc.ListLeasesRequest")
proto.RegisterType((*ListLeasesResponse)(nil), "walletrpc.ListLeasesResponse")
}
func init() { proto.RegisterFile("walletrpc/walletkit.proto", fileDescriptor_6cc6942ac78249e5) }
var fileDescriptor_6cc6942ac78249e5 = []byte{
// 1817 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0xef, 0x6e, 0x22, 0xc9,
0x11, 0x5f, 0x0c, 0xc6, 0x50, 0x80, 0x8d, 0x1b, 0xbc, 0x66, 0x59, 0xef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 0x28, 0xc7, 0xc7, 0xbe, 0x58, 0xc4, 0x16, 0x26, 0x2f,
0x74, 0x09, 0x10, 0xcd, 0x30, 0x68, 0xef, 0x99, 0xd1, 0x46, 0xf0, 0xbc, 0xf9, 0xe4, 0xe0, 0x83,
0xfe, 0x0e, 0xc5, 0xc5, 0x79, 0x01, 0xa9, 0xdd, 0xe8, 0x99, 0x79, 0xa5, 0xfa, 0xf9, 0x27, 0x75,
0x24, 0x79, 0x1d, 0x32, 0xf3, 0xee, 0x8d, 0xd4, 0xfd, 0x2c, 0x0c, 0x21, 0xd5, 0xd7, 0x2b, 0x31,
0x49, 0xd2, 0x81, 0xbc, 0xda, 0x10, 0x90, 0x9a, 0xb2, 0x15, 0x1d, 0xa6, 0xba, 0xff, 0x2c, 0x2e,
0x08, 0xcf, 0x7e, 0xff, 0xb7, 0xa3, 0x7b, 0x9b, 0x3e, 0x8c, 0xfb, 0xb5, 0x81, 0x3b, 0x3a, 0x1a,
0xb2, 0x77, 0x86, 0x63, 0x3b, 0xf7, 0x0e, 0xa1, 0x13, 0xd7, 0x7f, 0x3c, 0x1a, 0x3a, 0xd6, 0x11,
0xef, 0x7a, 0x47, 0x21, 0x4f, 0x3f, 0xcd, 0xff, 0x5f, 0xf3, 0xee, 0xbf, 0x01, 0x00, 0x00, 0xff,
0xff, 0x32, 0x3b, 0xa2, 0xdf, 0xf8, 0x11, 0x00, 0x00,
// 1851 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0x5f, 0x73, 0xe2, 0xc8,
0x11, 0x5f, 0x0c, 0xc6, 0xd0, 0x80, 0x8d, 0x07, 0xbc, 0x66, 0x59, 0xef, 0xd9, 0xab, 0x4b, 0x72,
0x4e, 0xee, 0x0e, 0x57, 0xbc, 0x75, 0x97, 0x3d, 0x27, 0x95, 0x8a, 0x8d, 0xe5, 0xc2, 0x05, 0x06,
0x67, 0xc0, 0x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
0xe4, 0xcd, 0xea, 0x96, 0xf6, 0x4f, 0xb0, 0x21, 0x3b, 0x3f, 0xf4, 0x4a, 0x61, 0x8e, 0x76, 0xa9,
0x11, 0x8f, 0xc5, 0x1a, 0xc5, 0x79, 0xe6, 0x49, 0x93, 0xf6, 0x9e, 0xe9, 0xc4, 0x56, 0x67, 0x5e,
0xcc, 0x98, 0xbf, 0x42, 0x31, 0xde, 0xde, 0x20, 0xb5, 0x78, 0x3e, 0xd3, 0x5e, 0x55, 0x3f, 0xff,
0x59, 0x1e, 0xa9, 0xbc, 0x0e, 0x99, 0x79, 0xb3, 0x81, 0xd4, 0xf3, 0xc4, 0x7a, 0xa6, 0xea, 0xeb,
0x95, 0x98, 0x54, 0xd2, 0x81, 0xbc, 0x5a, 0xbf, 0x90, 0x1a, 0xb2, 0x15, 0x05, 0xb1, 0xba, 0xff,
0x2c, 0x2e, 0x14, 0x9e, 0xfd, 0xf6, 0x2f, 0x47, 0xf7, 0x36, 0x7d, 0x18, 0xf7, 0x6b, 0x03, 0x77,
0x74, 0x34, 0x64, 0x63, 0x91, 0x63, 0x3b, 0xf7, 0x0e, 0xa1, 0x13, 0xd7, 0x7f, 0x3c, 0x1a, 0x3a,
0xd6, 0x11, 0x2f, 0xd2, 0x47, 0xa1, 0x9e, 0x7e, 0x9a, 0xff, 0xbd, 0xf4, 0xee, 0xdf, 0x01, 0x00,
0x00, 0xff, 0xff, 0xad, 0x1e, 0xe8, 0xf0, 0xa7, 0x12, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@ -1958,6 +2033,9 @@ type WalletKitClient interface {
//originally lock the output.
ReleaseOutput(ctx context.Context, in *ReleaseOutputRequest, opts ...grpc.CallOption) (*ReleaseOutputResponse, error)
//
//ListLeases lists all currently locked utxos.
ListLeases(ctx context.Context, in *ListLeasesRequest, opts ...grpc.CallOption) (*ListLeasesResponse, error)
//
//DeriveNextKey attempts to derive the *next* key within the key family
//(account in BIP43) specified. This method should return the next external
//child within this branch.
@ -2103,6 +2181,15 @@ func (c *walletKitClient) ReleaseOutput(ctx context.Context, in *ReleaseOutputRe
return out, nil
}
func (c *walletKitClient) ListLeases(ctx context.Context, in *ListLeasesRequest, opts ...grpc.CallOption) (*ListLeasesResponse, error) {
out := new(ListLeasesResponse)
err := c.cc.Invoke(ctx, "/walletrpc.WalletKit/ListLeases", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *walletKitClient) DeriveNextKey(ctx context.Context, in *KeyReq, opts ...grpc.CallOption) (*signrpc.KeyDescriptor, error) {
out := new(signrpc.KeyDescriptor)
err := c.cc.Invoke(ctx, "/walletrpc.WalletKit/DeriveNextKey", in, out, opts...)
@ -2230,6 +2317,9 @@ type WalletKitServer interface {
//originally lock the output.
ReleaseOutput(context.Context, *ReleaseOutputRequest) (*ReleaseOutputResponse, error)
//
//ListLeases lists all currently locked utxos.
ListLeases(context.Context, *ListLeasesRequest) (*ListLeasesResponse, error)
//
//DeriveNextKey attempts to derive the *next* key within the key family
//(account in BIP43) specified. This method should return the next external
//child within this branch.
@ -2353,6 +2443,9 @@ func (*UnimplementedWalletKitServer) LeaseOutput(ctx context.Context, req *Lease
func (*UnimplementedWalletKitServer) ReleaseOutput(ctx context.Context, req *ReleaseOutputRequest) (*ReleaseOutputResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ReleaseOutput not implemented")
}
func (*UnimplementedWalletKitServer) ListLeases(ctx context.Context, req *ListLeasesRequest) (*ListLeasesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListLeases not implemented")
}
func (*UnimplementedWalletKitServer) DeriveNextKey(ctx context.Context, req *KeyReq) (*signrpc.KeyDescriptor, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeriveNextKey not implemented")
}
@ -2448,6 +2541,24 @@ func _WalletKit_ReleaseOutput_Handler(srv interface{}, ctx context.Context, dec
return interceptor(ctx, in, info, handler)
}
func _WalletKit_ListLeases_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListLeasesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WalletKitServer).ListLeases(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/walletrpc.WalletKit/ListLeases",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WalletKitServer).ListLeases(ctx, req.(*ListLeasesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WalletKit_DeriveNextKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(KeyReq)
if err := dec(in); err != nil {
@ -2680,6 +2791,10 @@ var _WalletKit_serviceDesc = grpc.ServiceDesc{
MethodName: "ReleaseOutput",
Handler: _WalletKit_ReleaseOutput_Handler,
},
{
MethodName: "ListLeases",
Handler: _WalletKit_ListLeases_Handler,
},
{
MethodName: "DeriveNextKey",
Handler: _WalletKit_DeriveNextKey_Handler,

View File

@ -133,6 +133,24 @@ func local_request_WalletKit_ReleaseOutput_0(ctx context.Context, marshaler runt
}
func request_WalletKit_ListLeases_0(ctx context.Context, marshaler runtime.Marshaler, client WalletKitClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ListLeasesRequest
var metadata runtime.ServerMetadata
msg, err := client.ListLeases(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_WalletKit_ListLeases_0(ctx context.Context, marshaler runtime.Marshaler, server WalletKitServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ListLeasesRequest
var metadata runtime.ServerMetadata
msg, err := server.ListLeases(ctx, &protoReq)
return msg, metadata, err
}
func request_WalletKit_DeriveNextKey_0(ctx context.Context, marshaler runtime.Marshaler, client WalletKitClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq KeyReq
var metadata runtime.ServerMetadata
@ -609,6 +627,26 @@ func RegisterWalletKitHandlerServer(ctx context.Context, mux *runtime.ServeMux,
})
mux.Handle("POST", pattern_WalletKit_ListLeases_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_WalletKit_ListLeases_0(rctx, inboundMarshaler, server, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_WalletKit_ListLeases_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_WalletKit_DeriveNextKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@ -950,6 +988,26 @@ func RegisterWalletKitHandlerClient(ctx context.Context, mux *runtime.ServeMux,
})
mux.Handle("POST", pattern_WalletKit_ListLeases_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_WalletKit_ListLeases_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_WalletKit_ListLeases_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_WalletKit_DeriveNextKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@ -1200,6 +1258,8 @@ var (
pattern_WalletKit_ReleaseOutput_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v2", "wallet", "utxos", "release"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_WalletKit_ListLeases_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v2", "wallet", "utxos", "leases"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_WalletKit_DeriveNextKey_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v2", "wallet", "key", "next"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_WalletKit_DeriveKey_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v2", "wallet", "key"}, "", runtime.AssumeColonVerbOpt(true)))
@ -1232,6 +1292,8 @@ var (
forward_WalletKit_ReleaseOutput_0 = runtime.ForwardResponseMessage
forward_WalletKit_ListLeases_0 = runtime.ForwardResponseMessage
forward_WalletKit_DeriveNextKey_0 = runtime.ForwardResponseMessage
forward_WalletKit_DeriveKey_0 = runtime.ForwardResponseMessage

View File

@ -32,6 +32,11 @@ service WalletKit {
*/
rpc ReleaseOutput (ReleaseOutputRequest) returns (ReleaseOutputResponse);
/*
ListLeases lists all currently locked utxos.
*/
rpc ListLeases (ListLeasesRequest) returns (ListLeasesResponse);
/*
DeriveNextKey attempts to derive the *next* key within the key family
(account in BIP43) specified. This method should return the next external
@ -603,3 +608,11 @@ message FinalizePsbtResponse {
// The fully signed and finalized transaction in the raw wire format.
bytes raw_final_tx = 2;
}
message ListLeasesRequest {
}
message ListLeasesResponse {
// The list of currently leased utxos.
repeated UtxoLease locked_utxos = 1;
}

View File

@ -457,6 +457,29 @@
]
}
},
"/v2/wallet/utxos/leases": {
"post": {
"summary": "ListLeases lists all currently locked utxos.",
"operationId": "ListLeases",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/walletrpcListLeasesResponse"
}
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
}
},
"tags": [
"WalletKit"
]
}
},
"/v2/wallet/utxos/release": {
"post": {
"summary": "ReleaseOutput unlocks an output, allowing it to be available for coin\nselection if it remains unspent. The ID should match the one used to\noriginally lock the output.",
@ -894,6 +917,18 @@
}
}
},
"walletrpcListLeasesResponse": {
"type": "object",
"properties": {
"locked_utxos": {
"type": "array",
"items": {
"$ref": "#/definitions/walletrpcUtxoLease"
},
"description": "The list of currently leased utxos."
}
}
},
"walletrpcListSweepsResponse": {
"type": "object",
"properties": {

View File

@ -112,6 +112,10 @@ var (
Entity: "onchain",
Action: "write",
}},
"/walletrpc.WalletKit/ListLeases": {{
Entity: "onchain",
Action: "read",
}},
"/walletrpc.WalletKit/ListUnspent": {{
Entity: "onchain",
Action: "read",
@ -421,6 +425,20 @@ func (w *WalletKit) ReleaseOutput(ctx context.Context,
return &ReleaseOutputResponse{}, nil
}
// ListLeases returns a list of all currently locked utxos.
func (w *WalletKit) ListLeases(ctx context.Context,
req *ListLeasesRequest) (*ListLeasesResponse, error) {
leases, err := w.cfg.Wallet.ListLeasedOutputs()
if err != nil {
return nil, err
}
return &ListLeasesResponse{
LockedUtxos: marshallLeases(leases),
}, nil
}
// DeriveNextKey attempts to derive the *next* key within the key family
// (account in BIP43) specified. This method should return the next external
// child within this branch.

View File

@ -142,6 +142,10 @@ func (w *WalletController) ReleaseOutput(wtxmgr.LockID, wire.OutPoint) error {
return nil
}
func (w *WalletController) ListLeasedOutputs() ([]*wtxmgr.LockedOutput, error) {
return nil, nil
}
// FundPsbt currently does nothing.
func (w *WalletController) FundPsbt(_ *psbt.Packet,
_ chainfee.SatPerKWeight) (int32, error) {

View File

@ -405,6 +405,11 @@ func (b *BtcWallet) LeaseOutput(id wtxmgr.LockID, op wire.OutPoint,
return b.wallet.LeaseOutput(id, op, duration)
}
// ListLeasedOutputs returns a list of all currently locked outputs.
func (b *BtcWallet) ListLeasedOutputs() ([]*wtxmgr.LockedOutput, error) {
return b.wallet.ListLeasedOutputs()
}
// 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.

View File

@ -260,6 +260,9 @@ type WalletController interface {
// NOTE: This method requires the global coin selection lock to be held.
ReleaseOutput(id wtxmgr.LockID, op wire.OutPoint) error
// ListLeasedOutputs returns a list of all currently locked outputs.
ListLeasedOutputs() ([]*wtxmgr.LockedOutput, error)
// PublishTransaction performs cursory validation (dust checks, etc),
// then finally broadcasts the passed transaction to the Bitcoin network.
// If the transaction is rejected because it is conflicting with an