@@ -1593,6 +1593,28 @@ static struct io_plan *handle_sign_message(struct io_conn *conn,
15931593 take (towire_hsmd_sign_message_reply (NULL , & rsig )));
15941594}
15951595
1596+ /*~ lightningd asks us to sign a liquidity ad offer */
1597+ static struct io_plan * handle_sign_option_will_fund_offer (struct io_conn * conn ,
1598+ struct client * c ,
1599+ const u8 * msg_in )
1600+ {
1601+ struct pubkey funding_pubkey ;
1602+ u32 lease_expiry , channel_fee_base_max_msat ;
1603+ u16 channel_fee_max_ppt ;
1604+
1605+ if (!fromwire_hsmd_sign_option_will_fund_offer (msg_in ,
1606+ & funding_pubkey ,
1607+ & lease_expiry ,
1608+ & channel_fee_base_max_msat ,
1609+ & channel_fee_max_ppt ))
1610+ return bad_req (conn , c , msg_in );
1611+
1612+ status_failed (STATUS_FAIL_INTERNAL_ERROR ,
1613+ "handle_sign_option_will_fund_offer unimplemented" );
1614+ return bad_req_fmt (conn , c , msg_in ,
1615+ "handle_sign_option_will_fund_offer unimplemented" );
1616+ }
1617+
15961618/*~ lightningd asks us to sign a bolt12 (e.g. offer). */
15971619static struct io_plan * handle_sign_bolt12 (struct io_conn * conn ,
15981620 struct client * c ,
@@ -1688,6 +1710,9 @@ static bool check_client_capabilities(struct client *client,
16881710 case WIRE_HSMD_SIGN_MUTUAL_CLOSE_TX :
16891711 return (client -> capabilities & HSM_CAP_SIGN_CLOSING_TX ) != 0 ;
16901712
1713+ case WIRE_HSMD_SIGN_OPTION_WILL_FUND_OFFER :
1714+ return (client -> capabilities & HSM_CAP_SIGN_WILL_FUND_OFFER ) != 0 ;
1715+
16911716 case WIRE_HSMD_INIT :
16921717 case WIRE_HSMD_NEW_CHANNEL :
16931718 case WIRE_HSMD_CLIENT_HSMFD :
@@ -1719,6 +1744,7 @@ static bool check_client_capabilities(struct client *client,
17191744 case WIRE_HSMD_VALIDATE_COMMITMENT_TX_REPLY :
17201745 case WIRE_HSMD_VALIDATE_REVOCATION_REPLY :
17211746 case WIRE_HSMD_SIGN_TX_REPLY :
1747+ case WIRE_HSMD_SIGN_OPTION_WILL_FUND_OFFER_REPLY :
17221748 case WIRE_HSMD_GET_PER_COMMITMENT_POINT_REPLY :
17231749 case WIRE_HSMD_CHECK_FUTURE_SECRET_REPLY :
17241750 case WIRE_HSMD_GET_CHANNEL_BASEPOINTS_REPLY :
@@ -1830,6 +1856,9 @@ static struct io_plan *handle_client(struct io_conn *conn, struct client *c)
18301856 case WIRE_HSMD_SIGN_MESSAGE :
18311857 return handle_sign_message (conn , c , c -> msg_in );
18321858
1859+ case WIRE_HSMD_SIGN_OPTION_WILL_FUND_OFFER :
1860+ return handle_sign_option_will_fund_offer (conn , c , c -> msg_in );
1861+
18331862 case WIRE_HSMD_SIGN_BOLT12 :
18341863 return handle_sign_bolt12 (conn , c , c -> msg_in );
18351864#if DEVELOPER
@@ -1853,6 +1882,7 @@ static struct io_plan *handle_client(struct io_conn *conn, struct client *c)
18531882 case WIRE_HSMD_VALIDATE_COMMITMENT_TX_REPLY :
18541883 case WIRE_HSMD_VALIDATE_REVOCATION_REPLY :
18551884 case WIRE_HSMD_SIGN_TX_REPLY :
1885+ case WIRE_HSMD_SIGN_OPTION_WILL_FUND_OFFER_REPLY :
18561886 case WIRE_HSMD_GET_PER_COMMITMENT_POINT_REPLY :
18571887 case WIRE_HSMD_CHECK_FUTURE_SECRET_REPLY :
18581888 case WIRE_HSMD_GET_CHANNEL_BASEPOINTS_REPLY :
0 commit comments