From cbc11dac8f4ba9323df078a982a2624dafec1a47 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Tue, 6 Feb 2024 12:25:45 +0100 Subject: [PATCH 01/17] multi: add coin selection strategy to channel funding With this commit we prepare for the lnwallet channel funding logic to be aware of the config-level coin selection strategy by adding it to the wallet config. --- config_builder.go | 34 +++++++------- funding/manager_test.go | 18 ++++---- lnwallet/chanfunding/wallet_assembler.go | 5 +++ lnwallet/config.go | 5 +++ lnwallet/test/test_interface.go | 57 +++++++++++++----------- lnwallet/wallet.go | 5 ++- 6 files changed, 74 insertions(+), 50 deletions(-) diff --git a/config_builder.go b/config_builder.go index f1858cfd28..3fcfbb3766 100644 --- a/config_builder.go +++ b/config_builder.go @@ -686,14 +686,15 @@ func (d *DefaultWalletImpl) BuildChainControl( // Create, and start the lnwallet, which handles the core payment // channel logic, and exposes control via proxy state machines. lnWalletConfig := lnwallet.Config{ - Database: partialChainControl.Cfg.ChanStateDB, - Notifier: partialChainControl.ChainNotifier, - WalletController: walletController, - Signer: walletController, - FeeEstimator: partialChainControl.FeeEstimator, - SecretKeyRing: keyRing, - ChainIO: walletController, - NetParams: *walletConfig.NetParams, + Database: partialChainControl.Cfg.ChanStateDB, + Notifier: partialChainControl.ChainNotifier, + WalletController: walletController, + Signer: walletController, + FeeEstimator: partialChainControl.FeeEstimator, + SecretKeyRing: keyRing, + ChainIO: walletController, + NetParams: *walletConfig.NetParams, + CoinSelectionStrategy: walletConfig.CoinSelectionStrategy, } // The broadcast is already always active for neutrino nodes, so we @@ -800,14 +801,15 @@ func (d *RPCSignerWalletImpl) BuildChainControl( // Create, and start the lnwallet, which handles the core payment // channel logic, and exposes control via proxy state machines. lnWalletConfig := lnwallet.Config{ - Database: partialChainControl.Cfg.ChanStateDB, - Notifier: partialChainControl.ChainNotifier, - WalletController: rpcKeyRing, - Signer: rpcKeyRing, - FeeEstimator: partialChainControl.FeeEstimator, - SecretKeyRing: rpcKeyRing, - ChainIO: walletController, - NetParams: *walletConfig.NetParams, + Database: partialChainControl.Cfg.ChanStateDB, + Notifier: partialChainControl.ChainNotifier, + WalletController: rpcKeyRing, + Signer: rpcKeyRing, + FeeEstimator: partialChainControl.FeeEstimator, + SecretKeyRing: rpcKeyRing, + ChainIO: walletController, + NetParams: *walletConfig.NetParams, + CoinSelectionStrategy: walletConfig.CoinSelectionStrategy, } // We've created the wallet configuration now, so we can finish diff --git a/funding/manager_test.go b/funding/manager_test.go index 83ff6c12ba..6e1f222161 100644 --- a/funding/manager_test.go +++ b/funding/manager_test.go @@ -20,6 +20,7 @@ import ( "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcwallet/wallet" "github.com/lightningnetwork/lnd/chainntnfs" "github.com/lightningnetwork/lnd/chainreg" acpt "github.com/lightningnetwork/lnd/chanacceptor" @@ -360,14 +361,15 @@ func createTestWallet(cdb *channeldb.ChannelStateDB, netParams *chaincfg.Params, estimator chainfee.Estimator) (*lnwallet.LightningWallet, error) { wallet, err := lnwallet.NewLightningWallet(lnwallet.Config{ - Database: cdb, - Notifier: notifier, - SecretKeyRing: keyRing, - WalletController: wc, - Signer: signer, - ChainIO: bio, - FeeEstimator: estimator, - NetParams: *netParams, + Database: cdb, + Notifier: notifier, + SecretKeyRing: keyRing, + WalletController: wc, + Signer: signer, + ChainIO: bio, + FeeEstimator: estimator, + NetParams: *netParams, + CoinSelectionStrategy: wallet.CoinSelectionLargest, }) if err != nil { return nil, err diff --git a/lnwallet/chanfunding/wallet_assembler.go b/lnwallet/chanfunding/wallet_assembler.go index 104a5c05f6..c5be0e25c7 100644 --- a/lnwallet/chanfunding/wallet_assembler.go +++ b/lnwallet/chanfunding/wallet_assembler.go @@ -9,6 +9,7 @@ import ( "github.com/btcsuite/btcd/btcutil/txsort" "github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcwallet/wallet" "github.com/lightningnetwork/lnd/input" "github.com/lightningnetwork/lnd/keychain" ) @@ -207,6 +208,10 @@ type WalletConfig struct { // CoinSource is what the WalletAssembler uses to list/locate coins. CoinSource CoinSource + // CoinSelectionStrategy is the strategy that is used for selecting + // coins when funding a transaction. + CoinSelectionStrategy wallet.CoinSelectionStrategy + // CoinSelectionLocker allows the WalletAssembler to gain exclusive // access to the current set of coins returned by the CoinSource. CoinSelectLocker CoinSelectionLocker diff --git a/lnwallet/config.go b/lnwallet/config.go index e857616938..7eeacb6ea2 100644 --- a/lnwallet/config.go +++ b/lnwallet/config.go @@ -2,6 +2,7 @@ package lnwallet import ( "github.com/btcsuite/btcd/chaincfg" + "github.com/btcsuite/btcwallet/wallet" "github.com/lightningnetwork/lnd/chainntnfs" "github.com/lightningnetwork/lnd/channeldb" "github.com/lightningnetwork/lnd/input" @@ -57,4 +58,8 @@ type Config struct { // passively rebroadcast transactions in the background until they're // detected as being confirmed. Rebroadcaster Rebroadcaster + + // CoinSelectionStrategy is the strategy that is used for selecting + // coins when funding a transaction. + CoinSelectionStrategy wallet.CoinSelectionStrategy } diff --git a/lnwallet/test/test_interface.go b/lnwallet/test/test_interface.go index 19633f23c7..e4e4fd24c0 100644 --- a/lnwallet/test/test_interface.go +++ b/lnwallet/test/test_interface.go @@ -27,6 +27,7 @@ import ( "github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcwallet/chain" + "github.com/btcsuite/btcwallet/wallet" "github.com/btcsuite/btcwallet/walletdb" _ "github.com/btcsuite/btcwallet/walletdb/bdb" "github.com/davecgh/go-spew/spew" @@ -349,14 +350,15 @@ func createTestWallet(tempTestDir string, miningNode *rpctest.Harness, } cfg := lnwallet.Config{ - Database: fullDB.ChannelStateDB(), - Notifier: notifier, - SecretKeyRing: keyRing, - WalletController: wc, - Signer: signer, - ChainIO: bio, - FeeEstimator: chainfee.NewStaticEstimator(2500, 0), - NetParams: *netParams, + Database: fullDB.ChannelStateDB(), + Notifier: notifier, + SecretKeyRing: keyRing, + WalletController: wc, + Signer: signer, + ChainIO: bio, + FeeEstimator: chainfee.NewStaticEstimator(2500, 0), + NetParams: *netParams, + CoinSelectionStrategy: wallet.CoinSelectionLargest, } wallet, err := lnwallet.NewLightningWallet(cfg) @@ -2984,28 +2986,33 @@ func testSingleFunderExternalFundingTx(miner *rpctest.Harness, // Simulating external funding negotiation, we'll now create the // funding transaction for both parties. Utilizing existing tools, // we'll create a new chanfunding.Assembler hacked by Alice's wallet. - aliceChanFunder := chanfunding.NewWalletAssembler(chanfunding.WalletConfig{ - CoinSource: lnwallet.NewCoinSource(alice), - CoinSelectLocker: alice, - CoinLocker: alice, - Signer: alice.Cfg.Signer, - DustLimit: 600, - }) + aliceChanFunder := chanfunding.NewWalletAssembler( + chanfunding.WalletConfig{ + CoinSource: lnwallet.NewCoinSource(alice), + CoinSelectLocker: alice, + CoinLocker: alice, + Signer: alice.Cfg.Signer, + DustLimit: 600, + CoinSelectionStrategy: wallet.CoinSelectionLargest, + }, + ) // With the chan funder created, we'll now provision a funding intent, // bind the keys we obtained above, and finally obtain our funding // transaction and outpoint. - fundingIntent, err := aliceChanFunder.ProvisionChannel(&chanfunding.Request{ - LocalAmt: btcutil.Amount(chanAmt), - MinConfs: 1, - FeeRate: 253, - ChangeAddr: func() (btcutil.Address, error) { - return alice.NewAddress( - lnwallet.WitnessPubKey, true, - lnwallet.DefaultAccountName, - ) + fundingIntent, err := aliceChanFunder.ProvisionChannel( + &chanfunding.Request{ + LocalAmt: btcutil.Amount(chanAmt), + MinConfs: 1, + FeeRate: 253, + ChangeAddr: func() (btcutil.Address, error) { + return alice.NewAddress( + lnwallet.WitnessPubKey, true, + lnwallet.DefaultAccountName, + ) + }, }, - }) + ) require.NoError(t, err, "unable to perform coin selection") // With our intent created, we'll instruct it to finalize the funding diff --git a/lnwallet/wallet.go b/lnwallet/wallet.go index 7b9009fb11..183f4c72e9 100644 --- a/lnwallet/wallet.go +++ b/lnwallet/wallet.go @@ -852,7 +852,10 @@ func (l *LightningWallet) handleFundingReserveRequest(req *InitFundingReserveMsg CoinSelectLocker: l, CoinLocker: l, Signer: l.Cfg.Signer, - DustLimit: DustLimitForSize(input.P2WSHSize), + DustLimit: DustLimitForSize( + input.P2WSHSize, + ), + CoinSelectionStrategy: l.Cfg.CoinSelectionStrategy, } req.ChanFunder = chanfunding.NewWalletAssembler(cfg) } else { From f7198c4105e9bc04c1cbf7b77f547ed3af3d6078 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Tue, 6 Feb 2024 12:25:46 +0100 Subject: [PATCH 02/17] walletrpc+subserver_config: add coin selection strategy With this commit we also add the config-level coin selection strategy to the wallet RPC server. --- lnrpc/walletrpc/config_active.go | 5 +++++ subrpcserver_config.go | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/lnrpc/walletrpc/config_active.go b/lnrpc/walletrpc/config_active.go index 532ca7324f..4629ca2873 100644 --- a/lnrpc/walletrpc/config_active.go +++ b/lnrpc/walletrpc/config_active.go @@ -5,6 +5,7 @@ package walletrpc import ( "github.com/btcsuite/btcd/chaincfg" + "github.com/btcsuite/btcwallet/wallet" "github.com/lightningnetwork/lnd/keychain" "github.com/lightningnetwork/lnd/lnwallet" "github.com/lightningnetwork/lnd/lnwallet/chainfee" @@ -71,4 +72,8 @@ type Config struct { // CurrentNumAnchorChans returns the current number of non-private // anchor channels the wallet should be ready to fee bump if needed. CurrentNumAnchorChans func() (int, error) + + // CoinSelectionStrategy is the strategy that is used for selecting + // coins when funding a transaction. + CoinSelectionStrategy wallet.CoinSelectionStrategy } diff --git a/subrpcserver_config.go b/subrpcserver_config.go index b4b0041524..6687f71a7d 100644 --- a/subrpcserver_config.go +++ b/subrpcserver_config.go @@ -197,6 +197,11 @@ func (s *subRPCServerConfigs) PopulateDependencies(cfg *Config, subCfgValue.FieldByName("CurrentNumAnchorChans").Set( reflect.ValueOf(cc.Wallet.CurrentNumAnchorChans), ) + subCfgValue.FieldByName("CoinSelectionStrategy").Set( + reflect.ValueOf( + cc.Wallet.Cfg.CoinSelectionStrategy, + ), + ) case *autopilotrpc.Config: subCfgValue := extractReflectValue(subCfg) From 9bdddbcc56e7894fe95b7df9eef9bd99b794d5df Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Tue, 6 Feb 2024 12:25:47 +0100 Subject: [PATCH 03/17] mod+chanfunding: use coin selection strategy for channel funding The wallet assembler is now aware of the node config level coin selection strategy, so we can use it when creating new channels. --- go.mod | 12 ++-- go.sum | 32 ++++------ ...lnd_channel_funding_utxo_selection_test.go | 41 ++++++------ lnwallet/chanfunding/assembler.go | 5 +- lnwallet/chanfunding/coin_select.go | 64 +++++++++++-------- lnwallet/chanfunding/coin_select_test.go | 58 +++++++++-------- lnwallet/chanfunding/wallet_assembler.go | 22 ++++--- lnwallet/wallet.go | 11 ++-- 8 files changed, 131 insertions(+), 114 deletions(-) diff --git a/go.mod b/go.mod index 255362e0f4..5546c84400 100644 --- a/go.mod +++ b/go.mod @@ -10,11 +10,11 @@ require ( github.com/btcsuite/btcd/btcutil/psbt v1.1.8 github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f - github.com/btcsuite/btcwallet v0.16.10-0.20240127010340-16b422a2e8bf - github.com/btcsuite/btcwallet/wallet/txauthor v1.3.2 - github.com/btcsuite/btcwallet/wallet/txrules v1.2.0 - github.com/btcsuite/btcwallet/walletdb v1.4.0 - github.com/btcsuite/btcwallet/wtxmgr v1.5.0 + github.com/btcsuite/btcwallet v0.16.10-0.20240206195028-1f3534b00d14 + github.com/btcsuite/btcwallet/wallet/txauthor v1.3.4 + github.com/btcsuite/btcwallet/wallet/txrules v1.2.1 + github.com/btcsuite/btcwallet/walletdb v1.4.1 + github.com/btcsuite/btcwallet/wtxmgr v1.5.1 github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f github.com/davecgh/go-spew v1.1.1 github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 @@ -77,7 +77,7 @@ require ( github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect github.com/aead/siphash v1.0.1 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/btcsuite/btcwallet/wallet/txsizes v1.2.3 // indirect + github.com/btcsuite/btcwallet/wallet/txsizes v1.2.4 // indirect github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd // indirect github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792 // indirect github.com/btcsuite/winsvc v1.0.0 // indirect diff --git a/go.sum b/go.sum index 1d66ec9da4..0d9d0be78e 100644 --- a/go.sum +++ b/go.sum @@ -71,19 +71,15 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd v0.22.0-beta.0.20220111032746-97732e52810c/go.mod h1:tjmYdS6MLJ5/s0Fj4DbLgSbDHbEqLJrtnHecBFkdz5M= -github.com/btcsuite/btcd v0.22.0-beta.0.20220204213055-eaf0459ff879/go.mod h1:osu7EoKiL36UThEgzYPqdRaxeo0NU8VoXqgcnwpey0g= -github.com/btcsuite/btcd v0.23.1/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY= github.com/btcsuite/btcd v0.23.5-0.20231215221805-96c9fd8078fd/go.mod h1:nm3Bko6zh6bWP60UxwoT5LzdGJsQJaPo6HjduXq9p6A= github.com/btcsuite/btcd v0.24.1-0.20240123000108-62e6af035ec5 h1:8BHBWvtP6kkzvmCpyWEznq4eS0gfLOSVuXLesv413Xs= github.com/btcsuite/btcd v0.24.1-0.20240123000108-62e6af035ec5/go.mod h1:5C8ChTkl5ejr3WHj8tkQSCmydiMEPB0ZhQhehpq7Dgg= github.com/btcsuite/btcd/btcec/v2 v2.1.0/go.mod h1:2VzYrv4Gm4apmbVVsSq5bqf1Ec8v56E48Vt0Y/umPgA= -github.com/btcsuite/btcd/btcec/v2 v2.1.1/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= github.com/btcsuite/btcd/btcec/v2 v2.1.3/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btcd/btcutil v1.0.0/go.mod h1:Uoxwv0pqYWhD//tfTiipkxNfdhG9UrLwaeswfjfdF0A= github.com/btcsuite/btcd/btcutil v1.1.0/go.mod h1:5OapHB7A2hBBWLm48mmw4MOHNJCcUBTwmWH/0Jn8VHE= -github.com/btcsuite/btcd/btcutil v1.1.1/go.mod h1:nbKlBMNm9FGsdvKvu0essceubPiAcI57pYBNnsLAa34= github.com/btcsuite/btcd/btcutil v1.1.5 h1:+wER79R5670vs/ZusMTF1yTcRYE5GUsFbdjdisflzM8= github.com/btcsuite/btcd/btcutil v1.1.5/go.mod h1:PSZZ4UitpLBWzxGd5VGOrLnmOjtPP/a6HaFo12zMs00= github.com/btcsuite/btcd/btcutil/psbt v1.1.8 h1:4voqtT8UppT7nmKQkXV+T9K8UyQjKOn2z/ycpmJK8wg= @@ -95,20 +91,18 @@ github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0/go.mod h1:7SFka0XMvUgj3hfZtyd github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9VhRV3jjAVU7DJVjMaK+IsvSeZvFo= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= -github.com/btcsuite/btcwallet v0.16.10-0.20240127010340-16b422a2e8bf h1:eNjj5R0tKP48NQxDkuKr+C9frZsdzTAemEwu75ZDQg0= -github.com/btcsuite/btcwallet v0.16.10-0.20240127010340-16b422a2e8bf/go.mod h1:LzcW/LYkQLgDufv6Ouw4cOIW0YsY+A60MTtc61/OZTU= -github.com/btcsuite/btcwallet/wallet/txauthor v1.3.2 h1:etuLgGEojecsDOYTII8rYiGHjGyV5xTqsXi+ZQ715UU= -github.com/btcsuite/btcwallet/wallet/txauthor v1.3.2/go.mod h1:Zpk/LOb2sKqwP2lmHjaZT9AdaKsHPSbNLm2Uql5IQ/0= -github.com/btcsuite/btcwallet/wallet/txrules v1.2.0 h1:BtEN5Empw62/RVnZ0VcJaVtVlBijnLlJY+dwjAye2Bg= -github.com/btcsuite/btcwallet/wallet/txrules v1.2.0/go.mod h1:AtkqiL7ccKWxuLYtZm8Bu8G6q82w4yIZdgq6riy60z0= -github.com/btcsuite/btcwallet/wallet/txsizes v1.2.2/go.mod h1:q08Rms52VyWyXcp5zDc4tdFRKkFgNsMQrv3/LvE1448= -github.com/btcsuite/btcwallet/wallet/txsizes v1.2.3 h1:PszOub7iXVYbtGybym5TGCp9Dv1h1iX4rIC3HICZGLg= -github.com/btcsuite/btcwallet/wallet/txsizes v1.2.3/go.mod h1:q08Rms52VyWyXcp5zDc4tdFRKkFgNsMQrv3/LvE1448= -github.com/btcsuite/btcwallet/walletdb v1.3.5/go.mod h1:oJDxAEUHVtnmIIBaa22wSBPTVcs6hUp5NKWmI8xDwwU= -github.com/btcsuite/btcwallet/walletdb v1.4.0 h1:/C5JRF+dTuE2CNMCO/or5N8epsrhmSM4710uBQoYPTQ= -github.com/btcsuite/btcwallet/walletdb v1.4.0/go.mod h1:oJDxAEUHVtnmIIBaa22wSBPTVcs6hUp5NKWmI8xDwwU= -github.com/btcsuite/btcwallet/wtxmgr v1.5.0 h1:WO0KyN4l6H3JWnlFxfGR7r3gDnlGT7W2cL8vl6av4SU= -github.com/btcsuite/btcwallet/wtxmgr v1.5.0/go.mod h1:TQVDhFxseiGtZwEPvLgtfyxuNUDsIdaJdshvWzR0HJ4= +github.com/btcsuite/btcwallet v0.16.10-0.20240206195028-1f3534b00d14 h1:GnTInK5UIkDJw9alXR4JeOmKmodJu/5qYknZWqp1Sk0= +github.com/btcsuite/btcwallet v0.16.10-0.20240206195028-1f3534b00d14/go.mod h1:3EItwIQcrXGkcQlO1OginQ3Ab8YgE8kxka9hjgFuWxM= +github.com/btcsuite/btcwallet/wallet/txauthor v1.3.4 h1:poyHFf7+5+RdxNp5r2T6IBRD7RyraUsYARYbp/7t4D8= +github.com/btcsuite/btcwallet/wallet/txauthor v1.3.4/go.mod h1:GETGDQuyq+VFfH1S/+/7slLM/9aNa4l7P4ejX6dJfb0= +github.com/btcsuite/btcwallet/wallet/txrules v1.2.1 h1:UZo7YRzdHbwhK7Rhv3PO9bXgTxiOH45edK5qdsdiatk= +github.com/btcsuite/btcwallet/wallet/txrules v1.2.1/go.mod h1:MVSqRkju/IGxImXYPfBkG65FgEZYA4fXchheILMVl8g= +github.com/btcsuite/btcwallet/wallet/txsizes v1.2.4 h1:nmcKAVTv/cmYrs0A4hbiC6Qw+WTLYy/14SmTt3mLnCo= +github.com/btcsuite/btcwallet/wallet/txsizes v1.2.4/go.mod h1:YqJR8WAAHiKIPesZTr9Cx9Az4fRhRLcJ6GcxzRUZCAc= +github.com/btcsuite/btcwallet/walletdb v1.4.1 h1:NGIGoxx3trpaWqmdOeuhju7KJKp5UM96mQL21idF6RY= +github.com/btcsuite/btcwallet/walletdb v1.4.1/go.mod h1:7ZQ+BvOEre90YT7eSq8bLoxTsgXidUzA/mqbRS114CQ= +github.com/btcsuite/btcwallet/wtxmgr v1.5.1 h1:2yXhMGa4DNz16Mi0e8dVoiFXKOznXlxiGLhB3hKj2uA= +github.com/btcsuite/btcwallet/wtxmgr v1.5.1/go.mod h1:tO4FBSdann0xg/Jtm0grV7t1DzpQMK8nThYVtvSJo/8= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd h1:R/opQEbFEy9JGkIguV40SvRY1uliPX8ifOvi6ICsFCw= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= github.com/btcsuite/golangcrypto v0.0.0-20150304025918-53f62d9b43e8/go.mod h1:tYvUd8KLhm/oXvUeSEs2VlLghFjQt9+ZaF9ghH0JNjc= @@ -446,7 +440,6 @@ github.com/lightningnetwork/lightning-onion v1.2.1-0.20230823005744-06182b1d7d2f github.com/lightningnetwork/lightning-onion v1.2.1-0.20230823005744-06182b1d7d2f/go.mod h1:c0kvRShutpj3l6B9WtTsNTBUtjSmjZXbJd9ZBRQOSKI= github.com/lightningnetwork/lnd/cert v1.2.2 h1:71YK6hogeJtxSxw2teq3eGeuy4rHGKcFf0d0Uy4qBjI= github.com/lightningnetwork/lnd/cert v1.2.2/go.mod h1:jQmFn/Ez4zhDgq2hnYSw8r35bqGVxViXhX6Cd7HXM6U= -github.com/lightningnetwork/lnd/clock v1.0.1/go.mod h1:KnQudQ6w0IAMZi1SgvecLZQZ43ra2vpDNj7H/aasemg= github.com/lightningnetwork/lnd/clock v1.1.1 h1:OfR3/zcJd2RhH0RU+zX/77c0ZiOnIMsDIBjgjWdZgA0= github.com/lightningnetwork/lnd/clock v1.1.1/go.mod h1:mGnAhPyjYZQJmebS7aevElXKTFDuO+uNFFfMXK1W8xQ= github.com/lightningnetwork/lnd/fn v1.0.2 h1:6u+DHMvpHj09KH2Uw39fsbjydq9JvG23Rc99i+mhI1A= @@ -639,7 +632,6 @@ github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5t github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= gitlab.com/yawning/bsaes.git v0.0.0-20190805113838-0a714cd429ec h1:FpfFs4EhNehiVfzQttTuxanPIT43FtkkCFypIod8LHo= gitlab.com/yawning/bsaes.git v0.0.0-20190805113838-0a714cd429ec/go.mod h1:BZ1RAoRPbCxum9Grlv5aeksu2H8BiKehBYooU2LFiOQ= -go.etcd.io/bbolt v1.3.5-0.20200615073812-232d8fc87f50/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= go.etcd.io/etcd/api/v3 v3.5.7 h1:sbcmosSVesNrWOJ58ZQFitHMdncusIifYcrBfwrlJSY= diff --git a/itest/lnd_channel_funding_utxo_selection_test.go b/itest/lnd_channel_funding_utxo_selection_test.go index 27c8313515..4ba4a557bd 100644 --- a/itest/lnd_channel_funding_utxo_selection_test.go +++ b/itest/lnd_channel_funding_utxo_selection_test.go @@ -11,6 +11,7 @@ import ( "github.com/lightningnetwork/lnd/lntest" "github.com/lightningnetwork/lnd/lntest/node" "github.com/lightningnetwork/lnd/lnwallet" + "github.com/stretchr/testify/require" ) type chanFundUtxoSelectionTestCase struct { @@ -131,8 +132,7 @@ func testChannelUtxoSelection(ht *lntest.HarnessTest) { localAmt: btcutil.Amount(250_000), expectedBalance: btcutil.Amount(250_000), remainingWalletBalance: btcutil.Amount(350_000) - - btcutil.Amount(250_000) - - fundingFee(2, true), + btcutil.Amount(250_000) - fundingFee(2, true), }, // We are spending the entirety of two selected coins out of // three available in the wallet and expect no change output and @@ -147,8 +147,7 @@ func testChannelUtxoSelection(ht *lntest.HarnessTest) { 200_000, 50_000, }, expectedBalance: btcutil.Amount(200_000) + - btcutil.Amount(50_000) - - fundingFee(2, false), + btcutil.Amount(50_000) - fundingFee(2, false), remainingWalletBalance: btcutil.Amount(100_000), }, // Select all coins in wallet and use the maximum available @@ -162,15 +161,14 @@ func testChannelUtxoSelection(ht *lntest.HarnessTest) { selectedCoins: []btcutil.Amount{200_000, 100_000}, commitmentType: lnrpc.CommitmentType_ANCHORS, localAmt: btcutil.Amount(300_000) - - reserveAmount - - fundingFee(2, true), + reserveAmount - fundingFee(2, true), expectedBalance: btcutil.Amount(300_000) - - reserveAmount - - fundingFee(2, true), + reserveAmount - fundingFee(2, true), remainingWalletBalance: reserveAmount, }, - // Select all coins in wallet towards local amount except for a - // anchor reserve portion. + // Select all coins in wallet towards local amount except for an + // anchor reserve portion. Because the UTXOs are sorted by size + // by default, the reserve amount is just left in the wallet. { name: "selected, reserve from selected", initialCoins: []btcutil.Amount{ @@ -181,9 +179,9 @@ func testChannelUtxoSelection(ht *lntest.HarnessTest) { }, commitmentType: lnrpc.CommitmentType_ANCHORS, localAmt: btcutil.Amount(300_000) - - fundingFee(3, true), + fundingFee(2, true), expectedBalance: btcutil.Amount(300_000) - - fundingFee(3, true), + fundingFee(2, true), remainingWalletBalance: reserveAmount, }, // Select all coins in wallet and use more than the maximum @@ -197,8 +195,7 @@ func testChannelUtxoSelection(ht *lntest.HarnessTest) { selectedCoins: []btcutil.Amount{200_000, 100_000}, commitmentType: lnrpc.CommitmentType_ANCHORS, localAmt: btcutil.Amount(300_000) - - reserveAmount + 1 - - fundingFee(2, true), + reserveAmount + 1 - fundingFee(2, true), chanOpenShouldFail: true, expectedErrStr: "reserved wallet balance " + "invalidated: transaction would leave " + @@ -229,8 +226,7 @@ func testChannelUtxoSelection(ht *lntest.HarnessTest) { selectedCoins: []btcutil.Amount{200_000}, commitmentType: lnrpc.CommitmentType_ANCHORS, expectedBalance: btcutil.Amount(200_000) - - reserveAmount - - fundingFee(1, true), + reserveAmount - fundingFee(1, true), remainingWalletBalance: reserveAmount, }, // Confirm that already spent outputs can't be reused to fund @@ -249,8 +245,7 @@ func testChannelUtxoSelection(ht *lntest.HarnessTest) { success := ht.Run( tc.name, func(tt *testing.T) { runUtxoSelectionTestCase( - ht, tt, alice, bob, tc, - reserveAmount, + ht, alice, bob, tc, reserveAmount, ) }, ) @@ -264,7 +259,7 @@ func testChannelUtxoSelection(ht *lntest.HarnessTest) { // runUtxoSelectionTestCase runs a single test case asserting that test // conditions are met. -func runUtxoSelectionTestCase(ht *lntest.HarnessTest, t *testing.T, alice, +func runUtxoSelectionTestCase(ht *lntest.HarnessTest, alice, bob *node.HarnessNode, tc *chanFundUtxoSelectionTestCase, reserveAmount btcutil.Amount) { @@ -366,4 +361,12 @@ func runUtxoSelectionTestCase(ht *lntest.HarnessTest, t *testing.T, alice, int64(tc.remainingWalletBalance), 0, ) + + // Ensure the anchor channel reserve was carved out. + if commitType == lnrpc.CommitmentType_ANCHORS { + balance := alice.RPC.WalletBalance() + require.EqualValues( + ht, reserveAmount, balance.ReservedBalanceAnchorChan, + ) + } } diff --git a/lnwallet/chanfunding/assembler.go b/lnwallet/chanfunding/assembler.go index cd65da8a30..08fe31e439 100644 --- a/lnwallet/chanfunding/assembler.go +++ b/lnwallet/chanfunding/assembler.go @@ -3,6 +3,7 @@ package chanfunding import ( "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcwallet/wallet" "github.com/lightningnetwork/lnd/lnwallet/chainfee" ) @@ -11,12 +12,12 @@ import ( type CoinSource interface { // ListCoins returns all UTXOs from the source that have between // minConfs and maxConfs number of confirmations. - ListCoins(minConfs, maxConfs int32) ([]Coin, error) + ListCoins(minConfs, maxConfs int32) ([]wallet.Coin, error) // CoinFromOutPoint attempts to locate details pertaining to a coin // based on its outpoint. If the coin isn't under the control of the // backing CoinSource, then an error should be returned. - CoinFromOutPoint(wire.OutPoint) (*Coin, error) + CoinFromOutPoint(wire.OutPoint) (*wallet.Coin, error) } // CoinSelectionLocker is an interface that allows the caller to perform an diff --git a/lnwallet/chanfunding/coin_select.go b/lnwallet/chanfunding/coin_select.go index 64142cb0a6..f4f2e96450 100644 --- a/lnwallet/chanfunding/coin_select.go +++ b/lnwallet/chanfunding/coin_select.go @@ -6,20 +6,20 @@ import ( "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcwallet/wallet" "github.com/lightningnetwork/lnd/input" "github.com/lightningnetwork/lnd/lnwallet/chainfee" ) // ErrInsufficientFunds is a type matching the error interface which is -// returned when coin selection for a new funding transaction fails to due +// returned when coin selection for a new funding transaction fails due to // having an insufficient amount of confirmed funds. type ErrInsufficientFunds struct { amountAvailable btcutil.Amount amountSelected btcutil.Amount } -// Error returns a human readable string describing the error. +// Error returns a human-readable string describing the error. func (e *ErrInsufficientFunds) Error() string { return fmt.Sprintf("not enough witness outputs to create funding "+ "transaction, need %v only have %v available", @@ -33,33 +33,33 @@ type errUnsupportedInput struct { PkScript []byte } -// Error returns a human readable string describing the error. +// Error returns a human-readable string describing the error. func (e *errUnsupportedInput) Error() string { return fmt.Sprintf("unsupported address type: %x", e.PkScript) } -// Coin represents a spendable UTXO which is available for channel funding. -// This UTXO need not reside in our internal wallet as an example, and instead -// may be derived from an existing watch-only wallet. It wraps both the output -// present within the UTXO set, and also the outpoint that generates this coin. -type Coin struct { - wire.TxOut - - wire.OutPoint -} - // selectInputs selects a slice of inputs necessary to meet the specified // selection amount. If input selection is unable to succeed due to insufficient // funds, a non-nil error is returned. Additionally, the total amount of the // selected coins are returned in order for the caller to properly handle // change+fees. -func selectInputs(amt btcutil.Amount, coins []Coin) (btcutil.Amount, []Coin, error) { +func selectInputs(amt btcutil.Amount, coins []wallet.Coin, + strategy wallet.CoinSelectionStrategy, + feeRate chainfee.SatPerKWeight) (btcutil.Amount, []wallet.Coin, error) { + + // All coin selection code in the btcwallet library requires sat/KB. + feeSatPerKB := btcutil.Amount(feeRate.FeePerKVByte()) + + arrangedCoins, err := strategy.ArrangeCoins(coins, feeSatPerKB) + if err != nil { + return 0, nil, err + } satSelected := btcutil.Amount(0) - for i, coin := range coins { + for i, coin := range arrangedCoins { satSelected += btcutil.Amount(coin.Value) if satSelected >= amt { - return satSelected, coins[:i+1], nil + return satSelected, arrangedCoins[:i+1], nil } } @@ -69,8 +69,9 @@ func selectInputs(amt btcutil.Amount, coins []Coin) (btcutil.Amount, []Coin, err // calculateFees returns for the specified utxos and fee rate two fee // estimates, one calculated using a change output and one without. The weight // added to the estimator from a change output is for a P2WKH output. -func calculateFees(utxos []Coin, feeRate chainfee.SatPerKWeight) (btcutil.Amount, - btcutil.Amount, error) { +func calculateFees(utxos []wallet.Coin, + feeRate chainfee.SatPerKWeight) (btcutil.Amount, btcutil.Amount, + error) { var weightEstimate input.TxWeightEstimator for _, utxo := range utxos { @@ -129,13 +130,17 @@ func sanityCheckFee(totalOut, fee btcutil.Amount) error { // specified fee rate should be expressed in sat/kw for coin selection to // function properly. func CoinSelect(feeRate chainfee.SatPerKWeight, amt, dustLimit btcutil.Amount, - coins []Coin) ([]Coin, btcutil.Amount, error) { + coins []wallet.Coin, + strategy wallet.CoinSelectionStrategy) ([]wallet.Coin, btcutil.Amount, + error) { amtNeeded := amt for { // First perform an initial round of coin selection to estimate // the required fee. - totalSat, selectedUtxos, err := selectInputs(amtNeeded, coins) + totalSat, selectedUtxos, err := selectInputs( + amtNeeded, coins, strategy, feeRate, + ) if err != nil { return nil, 0, err } @@ -198,12 +203,15 @@ func CoinSelect(feeRate chainfee.SatPerKWeight, amt, dustLimit btcutil.Amount, // amt in total after fees, adhering to the specified fee rate. The selected // coins, the final output and change values are returned. func CoinSelectSubtractFees(feeRate chainfee.SatPerKWeight, amt, - dustLimit btcutil.Amount, coins []Coin) ([]Coin, btcutil.Amount, + dustLimit btcutil.Amount, coins []wallet.Coin, + strategy wallet.CoinSelectionStrategy) ([]wallet.Coin, btcutil.Amount, btcutil.Amount, error) { // First perform an initial round of coin selection to estimate // the required fee. - totalSat, selectedUtxos, err := selectInputs(amt, coins) + totalSat, selectedUtxos, err := selectInputs( + amt, coins, strategy, feeRate, + ) if err != nil { return nil, 0, 0, err } @@ -259,8 +267,9 @@ func CoinSelectSubtractFees(feeRate chainfee.SatPerKWeight, amt, // available. If insufficient funds are available this method selects all // available coins. func CoinSelectUpToAmount(feeRate chainfee.SatPerKWeight, minAmount, maxAmount, - reserved, dustLimit btcutil.Amount, coins []Coin) ([]Coin, - btcutil.Amount, btcutil.Amount, error) { + reserved, dustLimit btcutil.Amount, coins []wallet.Coin, + strategy wallet.CoinSelectionStrategy) ([]wallet.Coin, btcutil.Amount, + btcutil.Amount, error) { var ( // selectSubtractFee is tracking if our coin selection was @@ -280,7 +289,7 @@ func CoinSelectUpToAmount(feeRate chainfee.SatPerKWeight, minAmount, maxAmount, // First we try to select coins to create an output of the specified // maxAmount with or without a change output that covers the miner fee. selected, changeAmt, err := CoinSelect( - feeRate, maxAmount, dustLimit, coins, + feeRate, maxAmount, dustLimit, coins, strategy, ) var errInsufficientFunds *ErrInsufficientFunds @@ -320,6 +329,7 @@ func CoinSelectUpToAmount(feeRate chainfee.SatPerKWeight, minAmount, maxAmount, if selectSubtractFee { selected, outputAmount, changeAmt, err = CoinSelectSubtractFees( feeRate, totalBalance-reserved, dustLimit, coins, + strategy, ) if err != nil { return nil, 0, 0, err @@ -329,7 +339,7 @@ func CoinSelectUpToAmount(feeRate chainfee.SatPerKWeight, minAmount, maxAmount, // Sanity check the resulting output values to make sure we don't burn a // great part to fees. totalOut := outputAmount + changeAmt - sum := func(coins []Coin) btcutil.Amount { + sum := func(coins []wallet.Coin) btcutil.Amount { var sum btcutil.Amount for _, coin := range coins { sum += btcutil.Amount(coin.Value) diff --git a/lnwallet/chanfunding/coin_select_test.go b/lnwallet/chanfunding/coin_select_test.go index 96cc44579d..b37b027f7a 100644 --- a/lnwallet/chanfunding/coin_select_test.go +++ b/lnwallet/chanfunding/coin_select_test.go @@ -7,6 +7,7 @@ import ( "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcwallet/wallet" "github.com/lightningnetwork/lnd/input" "github.com/lightningnetwork/lnd/lnwallet/chainfee" "github.com/stretchr/testify/require" @@ -61,7 +62,7 @@ func TestCalculateFees(t *testing.T) { type testCase struct { name string - utxos []Coin + utxos []wallet.Coin expectedFeeNoChange btcutil.Amount expectedFeeWithChange btcutil.Amount @@ -71,7 +72,7 @@ func TestCalculateFees(t *testing.T) { testCases := []testCase{ { name: "one P2WKH input", - utxos: []Coin{ + utxos: []wallet.Coin{ { TxOut: wire.TxOut{ PkScript: p2wkhScript, @@ -87,7 +88,7 @@ func TestCalculateFees(t *testing.T) { { name: "one NP2WKH input", - utxos: []Coin{ + utxos: []wallet.Coin{ { TxOut: wire.TxOut{ PkScript: np2wkhScript, @@ -103,7 +104,7 @@ func TestCalculateFees(t *testing.T) { { name: "not supported P2KH input", - utxos: []Coin{ + utxos: []wallet.Coin{ { TxOut: wire.TxOut{ PkScript: p2khScript, @@ -148,7 +149,7 @@ func TestCoinSelect(t *testing.T) { type testCase struct { name string outputValue btcutil.Amount - coins []Coin + coins []wallet.Coin expectedInput []btcutil.Amount expectedChange btcutil.Amount @@ -161,7 +162,7 @@ func TestCoinSelect(t *testing.T) { // This will obviously lead to a change output of // almost 0.5 BTC. name: "big change", - coins: []Coin{ + coins: []wallet.Coin{ { TxOut: wire.TxOut{ PkScript: p2wkhScript, @@ -183,7 +184,7 @@ func TestCoinSelect(t *testing.T) { // This should lead to an error, as we don't have // enough funds to pay the fee. name: "nothing left for fees", - coins: []Coin{ + coins: []wallet.Coin{ { TxOut: wire.TxOut{ PkScript: p2wkhScript, @@ -199,7 +200,7 @@ func TestCoinSelect(t *testing.T) { // as big as possible, such that the remaining change // would be dust but instead goes to fees. name: "dust change", - coins: []Coin{ + coins: []wallet.Coin{ { TxOut: wire.TxOut{ PkScript: p2wkhScript, @@ -222,7 +223,7 @@ func TestCoinSelect(t *testing.T) { // We got just enough funds to create a change output above the // dust limit. name: "change right above dustlimit", - coins: []Coin{ + coins: []wallet.Coin{ { TxOut: wire.TxOut{ PkScript: p2wkhScript, @@ -244,7 +245,7 @@ func TestCoinSelect(t *testing.T) { { // If more than 20% of funds goes to fees, it should fail. name: "high fee", - coins: []Coin{ + coins: []wallet.Coin{ { TxOut: wire.TxOut{ PkScript: p2wkhScript, @@ -265,6 +266,7 @@ func TestCoinSelect(t *testing.T) { selected, changeAmt, err := CoinSelect( feeRate, test.outputValue, dustLimit, test.coins, + wallet.CoinSelectionLargest, ) if !test.expectErr && err != nil { t.Fatalf(err.Error()) @@ -323,7 +325,7 @@ func TestCoinSelectSubtractFees(t *testing.T) { name string highFee bool spendValue btcutil.Amount - coins []Coin + coins []wallet.Coin expectedInput []btcutil.Amount expectedFundingAmt btcutil.Amount @@ -337,7 +339,7 @@ func TestCoinSelectSubtractFees(t *testing.T) { // should lead to a funding TX with one output, the // rest goes to fees. name: "spend all", - coins: []Coin{ + coins: []wallet.Coin{ { TxOut: wire.TxOut{ PkScript: p2wkhScript, @@ -358,7 +360,7 @@ func TestCoinSelectSubtractFees(t *testing.T) { // We have 1.0 BTC available and spend half of it. This // should lead to a funding TX with a change output. name: "spend with change", - coins: []Coin{ + coins: []wallet.Coin{ { TxOut: wire.TxOut{ PkScript: p2wkhScript, @@ -379,7 +381,7 @@ func TestCoinSelectSubtractFees(t *testing.T) { // The total funds available is below the dust limit // after paying fees. name: "dust output", - coins: []Coin{ + coins: []wallet.Coin{ { TxOut: wire.TxOut{ PkScript: p2wkhScript, @@ -397,7 +399,7 @@ func TestCoinSelectSubtractFees(t *testing.T) { // is below the dust limit. The remainder should go // towards the funding output. name: "dust change", - coins: []Coin{ + coins: []wallet.Coin{ { TxOut: wire.TxOut{ PkScript: p2wkhScript, @@ -416,7 +418,7 @@ func TestCoinSelectSubtractFees(t *testing.T) { { // We got just enough funds to create an output above the dust limit. name: "output right above dustlimit", - coins: []Coin{ + coins: []wallet.Coin{ { TxOut: wire.TxOut{ PkScript: p2wkhScript, @@ -436,7 +438,7 @@ func TestCoinSelectSubtractFees(t *testing.T) { // Amount left is below dust limit after paying fee for // a change output, resulting in a no-change tx. name: "no amount to pay fee for change", - coins: []Coin{ + coins: []wallet.Coin{ { TxOut: wire.TxOut{ PkScript: p2wkhScript, @@ -456,7 +458,7 @@ func TestCoinSelectSubtractFees(t *testing.T) { // If more than 20% of funds goes to fees, it should fail. name: "high fee", highFee: true, - coins: []Coin{ + coins: []wallet.Coin{ { TxOut: wire.TxOut{ PkScript: p2wkhScript, @@ -481,6 +483,7 @@ func TestCoinSelectSubtractFees(t *testing.T) { selected, localFundingAmt, changeAmt, err := CoinSelectSubtractFees( feeRate, test.spendValue, dustLimit, test.coins, + wallet.CoinSelectionLargest, ) if err != nil { switch { @@ -551,7 +554,7 @@ func TestCoinSelectUpToAmount(t *testing.T) { minValue btcutil.Amount maxValue btcutil.Amount reserved btcutil.Amount - coins []Coin + coins []wallet.Coin expectedInput []btcutil.Amount expectedFundingAmt btcutil.Amount @@ -564,7 +567,7 @@ func TestCoinSelectUpToAmount(t *testing.T) { // This should lead to a funding TX with one output, the rest // goes to fees. name: "spend exactly all", - coins: []Coin{{ + coins: []wallet.Coin{{ TxOut: wire.TxOut{ PkScript: p2wkhScript, Value: 1 * coin, @@ -582,7 +585,7 @@ func TestCoinSelectUpToAmount(t *testing.T) { // This should lead to a funding TX with one output, the rest // goes to fees. name: "spend more", - coins: []Coin{{ + coins: []wallet.Coin{{ TxOut: wire.TxOut{ PkScript: p2wkhScript, Value: 1 * coin, @@ -600,7 +603,7 @@ func TestCoinSelectUpToAmount(t *testing.T) { // This should lead to a funding TX with one output and a // change to subtract the fees from. name: "spend far below", - coins: []Coin{{ + coins: []wallet.Coin{{ TxOut: wire.TxOut{ PkScript: p2wkhScript, Value: 1 * coin, @@ -619,7 +622,7 @@ func TestCoinSelectUpToAmount(t *testing.T) { // This should lead to a funding TX with one output where the // fee is subtracted from the total 1 BTC input value. name: "spend little below", - coins: []Coin{{ + coins: []wallet.Coin{{ TxOut: wire.TxOut{ PkScript: p2wkhScript, Value: 1 * coin, @@ -638,7 +641,7 @@ func TestCoinSelectUpToAmount(t *testing.T) { // The total funds available is below the dust limit after // paying fees. name: "dust output", - coins: []Coin{{ + coins: []wallet.Coin{{ TxOut: wire.TxOut{ PkScript: p2wkhScript, Value: int64( @@ -655,7 +658,7 @@ func TestCoinSelectUpToAmount(t *testing.T) { // If more than 20% of available wallet funds goes to fees, it // should fail. name: "high fee", - coins: []Coin{{ + coins: []wallet.Coin{{ TxOut: wire.TxOut{ PkScript: p2wkhScript, Value: int64( @@ -677,7 +680,7 @@ func TestCoinSelectUpToAmount(t *testing.T) { // check could result in a local amount higher than the maximum // amount that was expected. name: "sanity check for correct maximum amount", - coins: []Coin{{ + coins: []wallet.Coin{{ TxOut: wire.TxOut{ PkScript: p2wkhScript, Value: 1 * coin, @@ -695,7 +698,7 @@ func TestCoinSelectUpToAmount(t *testing.T) { // value as change and still maxing out the funding amount. name: "sanity check for correct reserved amount subtract " + "from total", - coins: []Coin{{ + coins: []wallet.Coin{{ TxOut: wire.TxOut{ PkScript: p2wkhScript, Value: 1 * coin, @@ -720,6 +723,7 @@ func TestCoinSelectUpToAmount(t *testing.T) { err := CoinSelectUpToAmount( feeRate, test.minValue, test.maxValue, test.reserved, dustLimit, test.coins, + wallet.CoinSelectionLargest, ) if len(test.expectErr) == 0 && err != nil { t.Fatalf(err.Error()) diff --git a/lnwallet/chanfunding/wallet_assembler.go b/lnwallet/chanfunding/wallet_assembler.go index c5be0e25c7..3c187d8082 100644 --- a/lnwallet/chanfunding/wallet_assembler.go +++ b/lnwallet/chanfunding/wallet_assembler.go @@ -31,7 +31,7 @@ type FullIntent struct { // InputCoins are the set of coins selected as inputs to this funding // transaction. - InputCoins []Coin + InputCoins []wallet.Coin // ChangeOutputs are the set of outputs that the Assembler will use as // change from the main funding transaction. @@ -268,12 +268,12 @@ func (w *WalletAssembler) ProvisionChannel(r *Request) (Intent, error) { var ( // allCoins refers to the entirety of coins in our // wallet that are available for funding a channel. - allCoins []Coin + allCoins []wallet.Coin // manuallySelectedCoins refers to the client-side // selected coins that should be considered available // for funding a channel. - manuallySelectedCoins []Coin + manuallySelectedCoins []wallet.Coin err error ) @@ -309,8 +309,8 @@ func (w *WalletAssembler) ProvisionChannel(r *Request) (Intent, error) { } var ( - coins []Coin - selectedCoins []Coin + coins []wallet.Coin + selectedCoins []wallet.Coin localContributionAmt btcutil.Amount changeAmt btcutil.Amount ) @@ -357,7 +357,9 @@ func (w *WalletAssembler) ProvisionChannel(r *Request) (Intent, error) { // enough funds in the wallet to cover for a reserve. reserve := r.WalletReserve if len(manuallySelectedCoins) > 0 { - sumCoins := func(coins []Coin) btcutil.Amount { + sumCoins := func( + coins []wallet.Coin) btcutil.Amount { + var sum btcutil.Amount for _, coin := range coins { sum += btcutil.Amount( @@ -390,6 +392,7 @@ func (w *WalletAssembler) ProvisionChannel(r *Request) (Intent, error) { err = CoinSelectUpToAmount( r.FeeRate, r.MinFundAmt, r.FundUpToMaxAmt, reserve, w.cfg.DustLimit, coins, + w.cfg.CoinSelectionStrategy, ) if err != nil { return err @@ -423,6 +426,7 @@ func (w *WalletAssembler) ProvisionChannel(r *Request) (Intent, error) { selectedCoins, localContributionAmt, changeAmt, err = CoinSelectSubtractFees( r.FeeRate, r.LocalAmt, dustLimit, coins, + w.cfg.CoinSelectionStrategy, ) if err != nil { return err @@ -435,6 +439,7 @@ func (w *WalletAssembler) ProvisionChannel(r *Request) (Intent, error) { localContributionAmt = r.LocalAmt selectedCoins, changeAmt, err = CoinSelect( r.FeeRate, r.LocalAmt, dustLimit, coins, + w.cfg.CoinSelectionStrategy, ) if err != nil { return err @@ -507,9 +512,10 @@ func (w *WalletAssembler) ProvisionChannel(r *Request) (Intent, error) { // outpointsToCoins maps outpoints to coins in our wallet iff these coins are // existent and returns an error otherwise. func outpointsToCoins(outpoints []wire.OutPoint, - coinFromOutPoint func(wire.OutPoint) (*Coin, error)) ([]Coin, error) { + coinFromOutPoint func(wire.OutPoint) (*wallet.Coin, error)) ( + []wallet.Coin, error) { - var selectedCoins []Coin + var selectedCoins []wallet.Coin for _, outpoint := range outpoints { coin, err := coinFromOutPoint( outpoint, diff --git a/lnwallet/wallet.go b/lnwallet/wallet.go index 183f4c72e9..12cd3e1d7b 100644 --- a/lnwallet/wallet.go +++ b/lnwallet/wallet.go @@ -20,6 +20,7 @@ import ( "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcwallet/wallet" "github.com/davecgh/go-spew/spew" "github.com/lightningnetwork/lnd/channeldb" "github.com/lightningnetwork/lnd/input" @@ -2530,7 +2531,7 @@ func NewCoinSource(w *LightningWallet) *CoinSource { // ListCoins returns all UTXOs from the source that have between // minConfs and maxConfs number of confirmations. func (c *CoinSource) ListCoins(minConfs int32, - maxConfs int32) ([]chanfunding.Coin, error) { + maxConfs int32) ([]wallet.Coin, error) { utxos, err := c.wallet.ListUnspentWitnessFromDefaultAccount( minConfs, maxConfs, @@ -2539,9 +2540,9 @@ func (c *CoinSource) ListCoins(minConfs int32, return nil, err } - var coins []chanfunding.Coin + var coins []wallet.Coin for _, utxo := range utxos { - coins = append(coins, chanfunding.Coin{ + coins = append(coins, wallet.Coin{ TxOut: wire.TxOut{ Value: int64(utxo.Value), PkScript: utxo.PkScript, @@ -2556,13 +2557,13 @@ func (c *CoinSource) ListCoins(minConfs int32, // CoinFromOutPoint attempts to locate details pertaining to a coin based on // its outpoint. If the coin isn't under the control of the backing CoinSource, // then an error should be returned. -func (c *CoinSource) CoinFromOutPoint(op wire.OutPoint) (*chanfunding.Coin, error) { +func (c *CoinSource) CoinFromOutPoint(op wire.OutPoint) (*wallet.Coin, error) { inputInfo, err := c.wallet.FetchInputInfo(&op) if err != nil { return nil, err } - return &chanfunding.Coin{ + return &wallet.Coin{ TxOut: wire.TxOut{ Value: int64(inputInfo.Value), PkScript: inputInfo.PkScript, From 4c82fb6cbb651cef2122670ca4d64fd1f24b4adb Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Tue, 6 Feb 2024 12:25:49 +0100 Subject: [PATCH 04/17] chanfunding: make coin selection generic Before this commit the coin selection logic in the chanfunding package would always assume that there is a P2WSH funding output and potentially a P2TR change output. But because we want to re-use the coin selection for things other than just channel funding, we make the logic more generic by allowing us to specify both the existing weight of the transaction (the already known, static parts of the TX) as well as the type of the potential change output we would use. --- lnwallet/chanfunding/coin_select.go | 61 +++++++++++++++++------- lnwallet/chanfunding/coin_select_test.go | 23 ++++++++- lnwallet/chanfunding/wallet_assembler.go | 14 ++++++ 3 files changed, 79 insertions(+), 19 deletions(-) diff --git a/lnwallet/chanfunding/coin_select.go b/lnwallet/chanfunding/coin_select.go index f4f2e96450..88c2f74196 100644 --- a/lnwallet/chanfunding/coin_select.go +++ b/lnwallet/chanfunding/coin_select.go @@ -38,6 +38,20 @@ func (e *errUnsupportedInput) Error() string { return fmt.Sprintf("unsupported address type: %x", e.PkScript) } +// ChangeAddressType is an enum-like type that describes the type of change +// address that should be generated for a transaction. +type ChangeAddressType uint8 + +const ( + // P2WKHChangeAddress indicates that the change output should be a + // P2WKH output. + P2WKHChangeAddress ChangeAddressType = 0 + + // P2TRChangeAddress indicates that the change output should be a + // P2TR output. + P2TRChangeAddress ChangeAddressType = 1 +) + // selectInputs selects a slice of inputs necessary to meet the specified // selection amount. If input selection is unable to succeed due to insufficient // funds, a non-nil error is returned. Additionally, the total amount of the @@ -69,11 +83,11 @@ func selectInputs(amt btcutil.Amount, coins []wallet.Coin, // calculateFees returns for the specified utxos and fee rate two fee // estimates, one calculated using a change output and one without. The weight // added to the estimator from a change output is for a P2WKH output. -func calculateFees(utxos []wallet.Coin, - feeRate chainfee.SatPerKWeight) (btcutil.Amount, btcutil.Amount, - error) { +func calculateFees(utxos []wallet.Coin, feeRate chainfee.SatPerKWeight, + existingWeight input.TxWeightEstimator, + changeType ChangeAddressType) (btcutil.Amount, btcutil.Amount, error) { - var weightEstimate input.TxWeightEstimator + weightEstimate := existingWeight for _, utxo := range utxos { switch { case txscript.IsPayToWitnessPubKeyHash(utxo.PkScript): @@ -92,17 +106,23 @@ func calculateFees(utxos []wallet.Coin, } } - // Channel funding multisig output is P2WSH. - weightEstimate.AddP2WSHOutput() - // Estimate the fee required for a transaction without a change // output. totalWeight := int64(weightEstimate.Weight()) requiredFeeNoChange := feeRate.FeeForWeight(totalWeight) // Estimate the fee required for a transaction with a change output. - // Assume that change output is a P2TR output. - weightEstimate.AddP2TROutput() + switch changeType { + case P2WKHChangeAddress: + weightEstimate.AddP2WKHOutput() + + case P2TRChangeAddress: + weightEstimate.AddP2TROutput() + + default: + return 0, 0, fmt.Errorf("unknown change address type: %v", + changeType) + } // Now that we have added the change output, redo the fee // estimate. @@ -130,9 +150,9 @@ func sanityCheckFee(totalOut, fee btcutil.Amount) error { // specified fee rate should be expressed in sat/kw for coin selection to // function properly. func CoinSelect(feeRate chainfee.SatPerKWeight, amt, dustLimit btcutil.Amount, - coins []wallet.Coin, - strategy wallet.CoinSelectionStrategy) ([]wallet.Coin, btcutil.Amount, - error) { + coins []wallet.Coin, strategy wallet.CoinSelectionStrategy, + existingWeight input.TxWeightEstimator, + changeType ChangeAddressType) ([]wallet.Coin, btcutil.Amount, error) { amtNeeded := amt for { @@ -148,7 +168,7 @@ func CoinSelect(feeRate chainfee.SatPerKWeight, amt, dustLimit btcutil.Amount, // Obtain fee estimates both with and without using a change // output. requiredFeeNoChange, requiredFeeWithChange, err := calculateFees( - selectedUtxos, feeRate, + selectedUtxos, feeRate, existingWeight, changeType, ) if err != nil { return nil, 0, err @@ -204,7 +224,9 @@ func CoinSelect(feeRate chainfee.SatPerKWeight, amt, dustLimit btcutil.Amount, // coins, the final output and change values are returned. func CoinSelectSubtractFees(feeRate chainfee.SatPerKWeight, amt, dustLimit btcutil.Amount, coins []wallet.Coin, - strategy wallet.CoinSelectionStrategy) ([]wallet.Coin, btcutil.Amount, + strategy wallet.CoinSelectionStrategy, + existingWeight input.TxWeightEstimator, + changeType ChangeAddressType) ([]wallet.Coin, btcutil.Amount, btcutil.Amount, error) { // First perform an initial round of coin selection to estimate @@ -219,7 +241,7 @@ func CoinSelectSubtractFees(feeRate chainfee.SatPerKWeight, amt, // Obtain fee estimates both with and without using a change // output. requiredFeeNoChange, requiredFeeWithChange, err := calculateFees( - selectedUtxos, feeRate, + selectedUtxos, feeRate, existingWeight, changeType, ) if err != nil { return nil, 0, 0, err @@ -268,7 +290,9 @@ func CoinSelectSubtractFees(feeRate chainfee.SatPerKWeight, amt, // available coins. func CoinSelectUpToAmount(feeRate chainfee.SatPerKWeight, minAmount, maxAmount, reserved, dustLimit btcutil.Amount, coins []wallet.Coin, - strategy wallet.CoinSelectionStrategy) ([]wallet.Coin, btcutil.Amount, + strategy wallet.CoinSelectionStrategy, + existingWeight input.TxWeightEstimator, + changeType ChangeAddressType) ([]wallet.Coin, btcutil.Amount, btcutil.Amount, error) { var ( @@ -289,7 +313,8 @@ func CoinSelectUpToAmount(feeRate chainfee.SatPerKWeight, minAmount, maxAmount, // First we try to select coins to create an output of the specified // maxAmount with or without a change output that covers the miner fee. selected, changeAmt, err := CoinSelect( - feeRate, maxAmount, dustLimit, coins, strategy, + feeRate, maxAmount, dustLimit, coins, strategy, existingWeight, + changeType, ) var errInsufficientFunds *ErrInsufficientFunds @@ -329,7 +354,7 @@ func CoinSelectUpToAmount(feeRate chainfee.SatPerKWeight, minAmount, maxAmount, if selectSubtractFee { selected, outputAmount, changeAmt, err = CoinSelectSubtractFees( feeRate, totalBalance-reserved, dustLimit, coins, - strategy, + strategy, existingWeight, changeType, ) if err != nil { return nil, 0, 0, err diff --git a/lnwallet/chanfunding/coin_select_test.go b/lnwallet/chanfunding/coin_select_test.go index b37b027f7a..468acd78e8 100644 --- a/lnwallet/chanfunding/coin_select_test.go +++ b/lnwallet/chanfunding/coin_select_test.go @@ -25,6 +25,8 @@ var ( p2khScript, _ = hex.DecodeString( "76a91411034bdcb6ccb7744fdfdeea958a6fb0b415a03288ac", ) + + defaultChanFundingChangeType = P2TRChangeAddress ) // fundingFee is a helper method that returns the fee estimate used for a tx @@ -117,11 +119,15 @@ func TestCalculateFees(t *testing.T) { }, } + fundingOutputEstimate := input.TxWeightEstimator{} + fundingOutputEstimate.AddP2WSHOutput() + for _, test := range testCases { test := test t.Run(test.name, func(t *testing.T) { feeNoChange, feeWithChange, err := calculateFees( - test.utxos, feeRate, + test.utxos, feeRate, fundingOutputEstimate, + defaultChanFundingChangeType, ) require.Equal(t, test.expectedErr, err) @@ -259,6 +265,9 @@ func TestCoinSelect(t *testing.T) { }, } + fundingOutputEstimate := input.TxWeightEstimator{} + fundingOutputEstimate.AddP2WSHOutput() + for _, test := range testCases { test := test t.Run(test.name, func(t *testing.T) { @@ -267,6 +276,8 @@ func TestCoinSelect(t *testing.T) { selected, changeAmt, err := CoinSelect( feeRate, test.outputValue, dustLimit, test.coins, wallet.CoinSelectionLargest, + fundingOutputEstimate, + defaultChanFundingChangeType, ) if !test.expectErr && err != nil { t.Fatalf(err.Error()) @@ -472,6 +483,9 @@ func TestCoinSelectSubtractFees(t *testing.T) { }, } + fundingOutputEstimate := input.TxWeightEstimator{} + fundingOutputEstimate.AddP2WSHOutput() + for _, test := range testCases { test := test @@ -484,6 +498,8 @@ func TestCoinSelectSubtractFees(t *testing.T) { selected, localFundingAmt, changeAmt, err := CoinSelectSubtractFees( feeRate, test.spendValue, dustLimit, test.coins, wallet.CoinSelectionLargest, + fundingOutputEstimate, + defaultChanFundingChangeType, ) if err != nil { switch { @@ -714,6 +730,9 @@ func TestCoinSelectUpToAmount(t *testing.T) { expectedChange: 10000, }} + fundingOutputEstimate := input.TxWeightEstimator{} + fundingOutputEstimate.AddP2WSHOutput() + for _, test := range testCases { test := test @@ -724,6 +743,8 @@ func TestCoinSelectUpToAmount(t *testing.T) { feeRate, test.minValue, test.maxValue, test.reserved, dustLimit, test.coins, wallet.CoinSelectionLargest, + fundingOutputEstimate, + defaultChanFundingChangeType, ) if len(test.expectErr) == 0 && err != nil { t.Fatalf(err.Error()) diff --git a/lnwallet/chanfunding/wallet_assembler.go b/lnwallet/chanfunding/wallet_assembler.go index 3c187d8082..651bc5558d 100644 --- a/lnwallet/chanfunding/wallet_assembler.go +++ b/lnwallet/chanfunding/wallet_assembler.go @@ -308,6 +308,17 @@ func (w *WalletAssembler) ProvisionChannel(r *Request) (Intent, error) { } } + // The coin selection algorithm requires to know what + // inputs/outputs are already present in the funding + // transaction and what a change output would look like. Since + // a channel funding is always either a P2WSH or P2TR output, + // we can use just P2WSH here (both of these output types have + // the same length). And we currently don't support specifying a + // change output type, so we always use P2TR. + var fundingOutputWeight input.TxWeightEstimator + fundingOutputWeight.AddP2WSHOutput() + changeType := P2TRChangeAddress + var ( coins []wallet.Coin selectedCoins []wallet.Coin @@ -393,6 +404,7 @@ func (w *WalletAssembler) ProvisionChannel(r *Request) (Intent, error) { r.FeeRate, r.MinFundAmt, r.FundUpToMaxAmt, reserve, w.cfg.DustLimit, coins, w.cfg.CoinSelectionStrategy, + fundingOutputWeight, changeType, ) if err != nil { return err @@ -427,6 +439,7 @@ func (w *WalletAssembler) ProvisionChannel(r *Request) (Intent, error) { err = CoinSelectSubtractFees( r.FeeRate, r.LocalAmt, dustLimit, coins, w.cfg.CoinSelectionStrategy, + fundingOutputWeight, changeType, ) if err != nil { return err @@ -440,6 +453,7 @@ func (w *WalletAssembler) ProvisionChannel(r *Request) (Intent, error) { selectedCoins, changeAmt, err = CoinSelect( r.FeeRate, r.LocalAmt, dustLimit, coins, w.cfg.CoinSelectionStrategy, + fundingOutputWeight, changeType, ) if err != nil { return err From 2619c03d7d16a29ef44ed159be599eb79b5cac5c Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Tue, 6 Feb 2024 12:25:50 +0100 Subject: [PATCH 05/17] chanfunding: allow using existing change output We'll want to be able to tell the coin selection algorithm that we intend to add any change to an existing output instead of assuming that a change output is always created. If we add any left over change to an existing output, we can skip the dust amount check as we assume the selected existing output already has a non-dust amount requested (responsibility of the caller to assert). --- lnwallet/chanfunding/coin_select.go | 17 ++- lnwallet/chanfunding/coin_select_test.go | 125 ++++++++++++++--------- 2 files changed, 92 insertions(+), 50 deletions(-) diff --git a/lnwallet/chanfunding/coin_select.go b/lnwallet/chanfunding/coin_select.go index 88c2f74196..8151bd6ed7 100644 --- a/lnwallet/chanfunding/coin_select.go +++ b/lnwallet/chanfunding/coin_select.go @@ -50,6 +50,14 @@ const ( // P2TRChangeAddress indicates that the change output should be a // P2TR output. P2TRChangeAddress ChangeAddressType = 1 + + // ExistingChangeAddress indicates that the coin selection algorithm + // should assume an existing output will be used for any change, meaning + // that the change amount calculated will be added to an existing output + // and no weight for a new change output should be assumed. The caller + // must assert that the output value of the selected existing output + // already is above dust when using this change address type. + ExistingChangeAddress ChangeAddressType = 2 ) // selectInputs selects a slice of inputs necessary to meet the specified @@ -119,6 +127,9 @@ func calculateFees(utxos []wallet.Coin, feeRate chainfee.SatPerKWeight, case P2TRChangeAddress: weightEstimate.AddP2TROutput() + case ExistingChangeAddress: + // Don't add an extra output. + default: return 0, 0, fmt.Errorf("unknown change address type: %v", changeType) @@ -203,7 +214,11 @@ func CoinSelect(feeRate chainfee.SatPerKWeight, amt, dustLimit btcutil.Amount, changeAmt = 0 } - if changeAmt < dustLimit { + // In case we would end up with a dust output if we created a + // change output, we instead just let the dust amount go to + // fees. Unless we want the change to go to an existing output, + // in that case we can increase that output value by any amount. + if changeAmt < dustLimit && changeType != ExistingChangeAddress { changeAmt = 0 } diff --git a/lnwallet/chanfunding/coin_select_test.go b/lnwallet/chanfunding/coin_select_test.go index 468acd78e8..8c10106511 100644 --- a/lnwallet/chanfunding/coin_select_test.go +++ b/lnwallet/chanfunding/coin_select_test.go @@ -144,18 +144,23 @@ func TestCalculateFees(t *testing.T) { // when creating a funding transaction, and that the calculated change is the // expected amount. // -// NOTE: coinSelect will always attempt to add a change output, so we must -// account for this in the tests. +// NOTE: coinSelect will always attempt to add a change output (unless the +// ExistingChangeAddress change address type is selected), so we must account +// for this in the tests. func TestCoinSelect(t *testing.T) { t.Parallel() - const feeRate = chainfee.SatPerKWeight(100) - const dustLimit = btcutil.Amount(1000) + const ( + feeRate = chainfee.SatPerKWeight(100) + dustLimit = btcutil.Amount(1000) + fullCoin = btcutil.SatoshiPerBitcoin + ) type testCase struct { name string outputValue btcutil.Amount coins []wallet.Coin + changeType ChangeAddressType expectedInput []btcutil.Amount expectedChange btcutil.Amount @@ -172,18 +177,20 @@ func TestCoinSelect(t *testing.T) { { TxOut: wire.TxOut{ PkScript: p2wkhScript, - Value: 1 * btcutil.SatoshiPerBitcoin, + Value: 1 * fullCoin, }, }, }, - outputValue: 0.5 * btcutil.SatoshiPerBitcoin, + outputValue: 0.5 * fullCoin, + changeType: defaultChanFundingChangeType, // The one and only input will be selected. expectedInput: []btcutil.Amount{ - 1 * btcutil.SatoshiPerBitcoin, + 1 * fullCoin, }, // Change will be what's left minus the fee. - expectedChange: 0.5*btcutil.SatoshiPerBitcoin - fundingFee(feeRate, 1, true), + expectedChange: 0.5*fullCoin - + fundingFee(feeRate, 1, true), }, { // We have 1 BTC available, and we want to send 1 BTC. @@ -194,12 +201,14 @@ func TestCoinSelect(t *testing.T) { { TxOut: wire.TxOut{ PkScript: p2wkhScript, - Value: 1 * btcutil.SatoshiPerBitcoin, + Value: 1 * fullCoin, }, }, }, - outputValue: 1 * btcutil.SatoshiPerBitcoin, - expectErr: true, + outputValue: 1 * fullCoin, + changeType: defaultChanFundingChangeType, + + expectErr: true, }, { // We have a 1 BTC input, and want to create an output @@ -210,59 +219,90 @@ func TestCoinSelect(t *testing.T) { { TxOut: wire.TxOut{ PkScript: p2wkhScript, - Value: 1 * btcutil.SatoshiPerBitcoin, + Value: 1 * fullCoin, }, }, }, // We tune the output value by subtracting the expected - // fee and the dustlimit. - outputValue: 1*btcutil.SatoshiPerBitcoin - fundingFee(feeRate, 1, false) - dustLimit, + // fee and the dust limit. + outputValue: 1*fullCoin - + fundingFee(feeRate, 1, false) - dustLimit, + changeType: defaultChanFundingChangeType, expectedInput: []btcutil.Amount{ - 1 * btcutil.SatoshiPerBitcoin, + 1 * fullCoin, }, // Change must be zero. expectedChange: 0, }, { - // We got just enough funds to create a change output above the - // dust limit. - name: "change right above dustlimit", + // We got just enough funds to create a change output + // above the dust limit. + name: "change right above dust limit", coins: []wallet.Coin{ { TxOut: wire.TxOut{ PkScript: p2wkhScript, - Value: int64(fundingFee(feeRate, 1, true) + 2*(dustLimit+1)), + Value: int64(fundingFee( + feeRate, 1, true, + ) + 2*(dustLimit+1)), }, }, }, - // We tune the output value to be just above the dust limit. + // We tune the output value to be just above the dust + // limit. outputValue: dustLimit + 1, + changeType: defaultChanFundingChangeType, expectedInput: []btcutil.Amount{ fundingFee(feeRate, 1, true) + 2*(dustLimit+1), }, - // After paying for the fee the change output should be just above - // the dust limit. + // After paying for the fee the change output should be + // just above the dust limit. expectedChange: dustLimit + 1, }, { - // If more than 20% of funds goes to fees, it should fail. + // If more than 20% of funds goes to fees, it should + // fail. name: "high fee", coins: []wallet.Coin{ { TxOut: wire.TxOut{ PkScript: p2wkhScript, - Value: int64(5 * fundingFee(feeRate, 1, false)), + Value: int64(5 * fundingFee( + feeRate, 1, false, + )), }, }, }, outputValue: 4 * fundingFee(feeRate, 1, false), + changeType: defaultChanFundingChangeType, expectErr: true, }, + { + // Fees go to an existing change output. + name: "existing change output", + coins: []wallet.Coin{ + { + TxOut: wire.TxOut{ + PkScript: p2wkhScript, + Value: 1000 + int64(fundingFee( + feeRate, 1, false, + )) + 1, + }, + }, + }, + outputValue: 1000, + changeType: ExistingChangeAddress, + + expectedInput: []btcutil.Amount{ + 1000 + fundingFee(feeRate, 1, false) + 1, + }, + expectedChange: 1, + }, } fundingOutputEstimate := input.TxWeightEstimator{} @@ -274,43 +314,30 @@ func TestCoinSelect(t *testing.T) { t.Parallel() selected, changeAmt, err := CoinSelect( - feeRate, test.outputValue, dustLimit, test.coins, - wallet.CoinSelectionLargest, - fundingOutputEstimate, - defaultChanFundingChangeType, + feeRate, test.outputValue, dustLimit, + test.coins, wallet.CoinSelectionLargest, + fundingOutputEstimate, test.changeType, ) - if !test.expectErr && err != nil { - t.Fatalf(err.Error()) - } - if test.expectErr && err == nil { - t.Fatalf("expected error") - } - - // If we got an expected error, there is nothing more to test. if test.expectErr { + require.Error(t, err) + return } + require.NoError(t, err) + // Check that the selected inputs match what we expect. - if len(selected) != len(test.expectedInput) { - t.Fatalf("expected %v inputs, got %v", - len(test.expectedInput), len(selected)) - } + require.Len(t, selected, len(test.expectedInput)) for i, coin := range selected { - if coin.Value != int64(test.expectedInput[i]) { - t.Fatalf("expected input %v to have value %v, "+ - "had %v", i, test.expectedInput[i], - coin.Value) - } + require.EqualValues( + t, test.expectedInput[i], coin.Value, + ) } // Assert we got the expected change amount. - if changeAmt != test.expectedChange { - t.Fatalf("expected %v change amt, got %v", - test.expectedChange, changeAmt) - } + require.EqualValues(t, test.expectedChange, changeAmt) }) } } From 7aa3662ea21c95d7aed01c8f55228b9552fe6444 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Tue, 6 Feb 2024 12:25:51 +0100 Subject: [PATCH 06/17] chanfunding: export change amount calculation We want to re-use the logic that determines what change amount is left over depending on whether we add or don't add a change output to a transaction, respecting the change output's dust limit. --- lnwallet/chanfunding/coin_select.go | 116 +++++++++++++++-------- lnwallet/chanfunding/coin_select_test.go | 100 +++++++++++++++++++ 2 files changed, 178 insertions(+), 38 deletions(-) diff --git a/lnwallet/chanfunding/coin_select.go b/lnwallet/chanfunding/coin_select.go index 8151bd6ed7..5594d26b1f 100644 --- a/lnwallet/chanfunding/coin_select.go +++ b/lnwallet/chanfunding/coin_select.go @@ -185,53 +185,93 @@ func CoinSelect(feeRate chainfee.SatPerKWeight, amt, dustLimit btcutil.Amount, return nil, 0, err } - // The difference between the selected amount and the amount - // requested will be used to pay fees, and generate a change - // output with the remaining. - overShootAmt := totalSat - amt + changeAmount, newAmtNeeded, err := CalculateChangeAmount( + totalSat, amt, requiredFeeNoChange, + requiredFeeWithChange, dustLimit, changeType, + ) + if err != nil { + return nil, 0, err + } - var changeAmt btcutil.Amount + // Need another round, the selected coins aren't enough to pay + // for the fees. + if newAmtNeeded != 0 { + amtNeeded = newAmtNeeded - switch { - // If the excess amount isn't enough to pay for fees based on - // fee rate and estimated size without using a change output, - // then increase the requested coin amount by the estimate - // required fee without using change, performing another round - // of coin selection. - case overShootAmt < requiredFeeNoChange: - amtNeeded = amt + requiredFeeNoChange continue + } - // If sufficient funds were selected to cover the fee required - // to include a change output, the remainder will be our change - // amount. - case overShootAmt > requiredFeeWithChange: - changeAmt = overShootAmt - requiredFeeWithChange + // Coin selection was successful. + return selectedUtxos, changeAmount, nil + } +} - // Otherwise we have selected enough to pay for a tx without a - // change output. - default: - changeAmt = 0 - } +// CalculateChangeAmount calculates the change amount being left over when the +// given total amount of sats is provided as inputs for the required output +// amount. The calculation takes into account that we might not want to add a +// change output if the change amount is below the dust limit. The first amount +// returned is the change amount. If that is non-zero, change is left over and +// should be dealt with. The second amount, if non-zero, indicates that the +// total input amount was just not enough to pay for the required amount and +// fees and that more coins need to be selected. +func CalculateChangeAmount(totalInputAmt, requiredAmt, requiredFeeNoChange, + requiredFeeWithChange, dustLimit btcutil.Amount, + changeType ChangeAddressType) (btcutil.Amount, btcutil.Amount, error) { - // In case we would end up with a dust output if we created a - // change output, we instead just let the dust amount go to - // fees. Unless we want the change to go to an existing output, - // in that case we can increase that output value by any amount. - if changeAmt < dustLimit && changeType != ExistingChangeAddress { - changeAmt = 0 - } + // This is just a sanity check to make sure the function is used + // correctly. + if changeType == ExistingChangeAddress && + requiredFeeNoChange != requiredFeeWithChange { - // Sanity check the resulting output values to make sure we - // don't burn a great part to fees. - totalOut := amt + changeAmt - err = sanityCheckFee(totalOut, totalSat-totalOut) - if err != nil { - return nil, 0, err - } + return 0, 0, fmt.Errorf("when using existing change address, " + + "the fees for with or without change must be the same") + } + + // The difference between the selected amount and the amount + // requested will be used to pay fees, and generate a change + // output with the remaining. + overShootAmt := totalInputAmt - requiredAmt + + var changeAmt btcutil.Amount + + switch { + // If the excess amount isn't enough to pay for fees based on + // fee rate and estimated size without using a change output, + // then increase the requested coin amount by the estimate + // required fee without using change, performing another round + // of coin selection. + case overShootAmt < requiredFeeNoChange: + return 0, requiredAmt + requiredFeeNoChange, nil + + // If sufficient funds were selected to cover the fee required + // to include a change output, the remainder will be our change + // amount. + case overShootAmt > requiredFeeWithChange: + changeAmt = overShootAmt - requiredFeeWithChange + + // Otherwise we have selected enough to pay for a tx without a + // change output. + default: + changeAmt = 0 + } - return selectedUtxos, changeAmt, nil + // In case we would end up with a dust output if we created a + // change output, we instead just let the dust amount go to + // fees. Unless we want the change to go to an existing output, + // in that case we can increase that output value by any amount. + if changeAmt < dustLimit && changeType != ExistingChangeAddress { + changeAmt = 0 } + + // Sanity check the resulting output values to make sure we + // don't burn a great part to fees. + totalOut := requiredAmt + changeAmt + err := sanityCheckFee(totalOut, totalInputAmt-totalOut) + if err != nil { + return 0, 0, err + } + + return changeAmt, 0, nil } // CoinSelectSubtractFees attempts to select coins such that we'll spend up to diff --git a/lnwallet/chanfunding/coin_select_test.go b/lnwallet/chanfunding/coin_select_test.go index 8c10106511..43027f32fc 100644 --- a/lnwallet/chanfunding/coin_select_test.go +++ b/lnwallet/chanfunding/coin_select_test.go @@ -342,6 +342,106 @@ func TestCoinSelect(t *testing.T) { } } +// TestCalculateChangeAmount tests that the change amount calculation performs +// correctly, taking into account the type of change output and whether we want +// to create a change output in the first place. +func TestCalculateChangeAmount(t *testing.T) { + t.Parallel() + + testCases := []struct { + name string + totalInputAmt btcutil.Amount + requiredAmt btcutil.Amount + feeNoChange btcutil.Amount + feeWithChange btcutil.Amount + dustLimit btcutil.Amount + changeType ChangeAddressType + + expectErr string + expectChangeAmt btcutil.Amount + expectNeedMore btcutil.Amount + }{{ + // Coin selection returned a coin larger than the required + // amount, but still not enough to pay for the fees. This should + // trigger another round of coin selection with a larger + // required amount. + name: "need to select more", + totalInputAmt: 500, + requiredAmt: 490, + feeNoChange: 12, + + expectNeedMore: 502, + }, { + // We are using an existing change output, so we'll only want + // to make sure to select enough for a TX _without_ a change + // output added. Because we're using an existing output, the + // dust limit calculation should also be skipped. + name: "sufficiently large for existing change output", + totalInputAmt: 500, + requiredAmt: 400, + feeNoChange: 10, + feeWithChange: 10, + dustLimit: 100, + changeType: ExistingChangeAddress, + + expectChangeAmt: 90, + }, { + name: "sufficiently large for adding a change output", + totalInputAmt: 500, + requiredAmt: 300, + feeNoChange: 40, + feeWithChange: 50, + dustLimit: 100, + + expectChangeAmt: 150, + }, { + name: "sufficiently large for tx without change " + + "amount", + totalInputAmt: 500, + requiredAmt: 460, + feeNoChange: 40, + feeWithChange: 50, + + expectChangeAmt: 0, + }, { + name: "fee percent too large", + totalInputAmt: 100, + requiredAmt: 50, + feeNoChange: 10, + feeWithChange: 45, + dustLimit: 5, + + expectErr: "fee 0.00000045 BTC on total output value " + + "0.00000055", + }, { + name: "invalid usage of function", + feeNoChange: 5, + feeWithChange: 10, + changeType: ExistingChangeAddress, + + expectErr: "fees for with or without change must be the same", + }} + + for _, tc := range testCases { + tc := tc + t.Run(tc.name, func(tt *testing.T) { + changeAmt, needMore, err := CalculateChangeAmount( + tc.totalInputAmt, tc.requiredAmt, + tc.feeNoChange, tc.feeWithChange, tc.dustLimit, + tc.changeType, + ) + + if tc.expectErr != "" { + require.ErrorContains(tt, err, tc.expectErr) + return + } + + require.EqualValues(tt, tc.expectChangeAmt, changeAmt) + require.EqualValues(tt, tc.expectNeedMore, needMore) + }) + } +} + // TestCoinSelectSubtractFees tests that we pick coins adding up to the // expected amount when creating a funding transaction, and that a change // output is created only when necessary. From 6773d6a6f60aa76d728a7a687c5cacae08f0c52e Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Tue, 6 Feb 2024 12:25:52 +0100 Subject: [PATCH 07/17] btcwallet: add EstimateInputWeight helper function This is a helper function that we will need to accurately determine the weight of inputs specified in a PSBT. Due to the nature of P2WSH and script-spend P2TR inputs, we can only accurately estimate their weights if the full witness is already known. So this helper function rejects inputs that use a script spend path but don't fully specify the complete witness stack. --- lnwallet/btcwallet/psbt.go | 73 +++++++++++++++ lnwallet/btcwallet/psbt_test.go | 152 ++++++++++++++++++++++++++++++++ 2 files changed, 225 insertions(+) diff --git a/lnwallet/btcwallet/psbt.go b/lnwallet/btcwallet/psbt.go index 7d0c633a17..a91346afad 100644 --- a/lnwallet/btcwallet/psbt.go +++ b/lnwallet/btcwallet/psbt.go @@ -3,6 +3,7 @@ package btcwallet import ( "bytes" "crypto/sha256" + "errors" "fmt" "github.com/btcsuite/btcd/btcec/v2" @@ -30,6 +31,22 @@ var ( // the key before signing the input. The value d0 is leet speak for // "do", short for "double". PsbtKeyTypeInputSignatureTweakDouble = []byte{0xd0} + + // ErrInputMissingUTXOInfo is returned if a PSBT input is supplied that + // does not specify the witness UTXO info. + ErrInputMissingUTXOInfo = errors.New( + "input doesn't specify any UTXO info", + ) + + // ErrScriptSpendFeeEstimationUnsupported is returned if a PSBT input is + // of a script spend type. + ErrScriptSpendFeeEstimationUnsupported = errors.New( + "cannot estimate fee for script spend inputs", + ) + + // ErrUnsupportedScript is returned if a supplied pk script is not + // known or supported. + ErrUnsupportedScript = errors.New("unsupported or unknown pk script") ) // FundPsbt creates a fully populated PSBT packet that contains enough inputs to @@ -352,6 +369,62 @@ func validateSigningMethod(in *psbt.PInput) (input.SignMethod, error) { } } +// EstimateInputWeight estimates the weight of a PSBT input and adds it to the +// passed in TxWeightEstimator. It returns an error if the input type is +// unknown or unsupported. Only inputs that have a known witness size are +// supported, which is P2WKH, NP2WKH and P2TR (key spend path). +func EstimateInputWeight(in *psbt.PInput, w *input.TxWeightEstimator) error { + if in.WitnessUtxo == nil { + return ErrInputMissingUTXOInfo + } + + pkScript := in.WitnessUtxo.PkScript + switch { + case txscript.IsPayToScriptHash(pkScript): + w.AddNestedP2WKHInput() + + case txscript.IsPayToWitnessPubKeyHash(pkScript): + w.AddP2WKHInput() + + case txscript.IsPayToWitnessScriptHash(pkScript): + return fmt.Errorf("P2WSH inputs are not supported, cannot "+ + "estimate witness size for script spend: %w", + ErrScriptSpendFeeEstimationUnsupported) + + case txscript.IsPayToTaproot(pkScript): + signMethod, err := validateSigningMethod(in) + if err != nil { + return fmt.Errorf("error determining p2tr signing "+ + "method: %w", err) + } + + switch signMethod { + // For p2tr key spend paths. + case input.TaprootKeySpendBIP0086SignMethod, + input.TaprootKeySpendSignMethod: + + w.AddTaprootKeySpendInput(in.SighashType) + + // For p2tr script spend path. + case input.TaprootScriptSpendSignMethod: + return fmt.Errorf("P2TR inputs are not supported, "+ + "cannot estimate witness size for script "+ + "spend: %w", + ErrScriptSpendFeeEstimationUnsupported) + + default: + return fmt.Errorf("unsupported signing method for "+ + "PSBT signing: %v", signMethod) + } + + default: + return fmt.Errorf("unknown input type for script %x: %w", + pkScript, ErrUnsupportedScript) + } + + return nil +} + // SignSegWitV0 attempts to generate a signature for a SegWit version 0 input // and stores it in the PartialSigs (and FinalScriptSig for np2wkh addresses) // field. diff --git a/lnwallet/btcwallet/psbt_test.go b/lnwallet/btcwallet/psbt_test.go index 245ea682c9..74ec174adb 100644 --- a/lnwallet/btcwallet/psbt_test.go +++ b/lnwallet/btcwallet/psbt_test.go @@ -7,6 +7,7 @@ import ( "fmt" "testing" + "github.com/btcsuite/btcd/blockchain" "github.com/btcsuite/btcd/btcec/v2" "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/btcutil/psbt" @@ -343,3 +344,154 @@ func TestSignPsbt(t *testing.T) { require.NoError(t, vm.Execute()) } } + +// TestEstimateInputWeight tests that we correctly estimate the weight of a +// PSBT input if it supplies all required information. +func TestEstimateInputWeight(t *testing.T) { + genScript := func(f func([]byte) ([]byte, error)) []byte { + pkScript, _ := f([]byte{}) + return pkScript + } + + var ( + witnessScaleFactor = blockchain.WitnessScaleFactor + p2trScript, _ = txscript.PayToTaprootScript( + &input.TaprootNUMSKey, + ) + dummyLeaf = txscript.TapLeaf{ + LeafVersion: txscript.BaseLeafVersion, + Script: []byte("some bitcoin script"), + } + dummyLeafHash = dummyLeaf.TapHash() + ) + + testCases := []struct { + name string + in *psbt.PInput + + expectedErr error + expectedErrString string + + // expectedWitnessWeight is the expected weight of the content + // of the witness of the input (without the base input size that + // is constant for all types of inputs). + expectedWitnessWeight int + }{{ + name: "empty input", + in: &psbt.PInput{}, + expectedErr: ErrInputMissingUTXOInfo, + }, { + name: "empty pkScript", + in: &psbt.PInput{ + WitnessUtxo: &wire.TxOut{}, + }, + expectedErr: ErrUnsupportedScript, + }, { + name: "nested p2wpkh input", + in: &psbt.PInput{ + WitnessUtxo: &wire.TxOut{ + PkScript: genScript(input.GenerateP2SH), + }, + }, + expectedWitnessWeight: input.P2WKHWitnessSize + + input.NestedP2WPKHSize*witnessScaleFactor, + }, { + name: "p2wpkh input", + in: &psbt.PInput{ + WitnessUtxo: &wire.TxOut{ + PkScript: genScript(input.WitnessPubKeyHash), + }, + }, + expectedWitnessWeight: input.P2WKHWitnessSize, + }, { + name: "p2wsh input", + in: &psbt.PInput{ + WitnessUtxo: &wire.TxOut{ + PkScript: genScript(input.WitnessScriptHash), + }, + }, + expectedErr: ErrScriptSpendFeeEstimationUnsupported, + }, { + name: "p2tr with no derivation info", + in: &psbt.PInput{ + WitnessUtxo: &wire.TxOut{ + PkScript: p2trScript, + }, + }, + expectedErrString: "cannot sign for taproot input " + + "without taproot BIP0032 derivation info", + }, { + name: "p2tr key spend", + in: &psbt.PInput{ + WitnessUtxo: &wire.TxOut{ + PkScript: p2trScript, + }, + SighashType: txscript.SigHashSingle, + TaprootBip32Derivation: []*psbt.TaprootBip32Derivation{ + {}, + }, + }, + //nolint:lll + expectedWitnessWeight: input.TaprootKeyPathCustomSighashWitnessSize, + }, { + name: "p2tr script spend", + in: &psbt.PInput{ + WitnessUtxo: &wire.TxOut{ + PkScript: p2trScript, + }, + TaprootBip32Derivation: []*psbt.TaprootBip32Derivation{ + { + LeafHashes: [][]byte{ + dummyLeafHash[:], + }, + }, + }, + TaprootLeafScript: []*psbt.TaprootTapLeafScript{ + { + LeafVersion: dummyLeaf.LeafVersion, + Script: dummyLeaf.Script, + }, + }, + }, + expectedErr: ErrScriptSpendFeeEstimationUnsupported, + }} + + // The non-witness weight for a TX with a single input. + nonWitnessWeight := input.BaseTxSize + 1 + 1 + input.InputSize + + // The base weight of a witness TX. + baseWeight := (nonWitnessWeight * witnessScaleFactor) + + input.WitnessHeaderSize + + for _, tc := range testCases { + tc := tc + + t.Run(tc.name, func(tt *testing.T) { + estimator := input.TxWeightEstimator{} + err := EstimateInputWeight(tc.in, &estimator) + + if tc.expectedErr != nil { + require.Error(tt, err) + require.ErrorIs(tt, err, tc.expectedErr) + + return + } + + if tc.expectedErrString != "" { + require.Error(tt, err) + require.Contains( + tt, err.Error(), tc.expectedErrString, + ) + + return + } + + require.NoError(tt, err) + + require.EqualValues( + tt, baseWeight+tc.expectedWitnessWeight, + estimator.Weight(), + ) + }) + } +} From 90c2926fdf7e06d8393f192c4b6fac076f60c4ad Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Tue, 6 Feb 2024 12:25:53 +0100 Subject: [PATCH 08/17] input: add AddOutput method to TxWeightEstimator This commit adds a helper method to estimate the weight of an output by the given pkScript. --- input/size.go | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/input/size.go b/input/size.go index 2fdd7f2ccc..e71e4190b5 100644 --- a/input/size.go +++ b/input/size.go @@ -49,6 +49,11 @@ const ( // - max-size: 40 bytes UnknownWitnessSize = 1 + 1 + 40 + // BaseOutputSize 9 bytes + // - value: 8 bytes + // - var_int: 1 byte (pkscript_length) + BaseOutputSize = 8 + 1 + // P2PKHSize 25 bytes. P2PKHSize = 25 @@ -56,19 +61,19 @@ const ( // - value: 8 bytes // - var_int: 1 byte (pkscript_length) // - pkscript (p2pkh): 25 bytes - P2PKHOutputSize = 8 + 1 + P2PKHSize + P2PKHOutputSize = BaseOutputSize + P2PKHSize // P2WKHOutputSize 31 bytes // - value: 8 bytes // - var_int: 1 byte (pkscript_length) // - pkscript (p2wpkh): 22 bytes - P2WKHOutputSize = 8 + 1 + P2WPKHSize + P2WKHOutputSize = BaseOutputSize + P2WPKHSize // P2WSHOutputSize 43 bytes // - value: 8 bytes // - var_int: 1 byte (pkscript_length) // - pkscript (p2wsh): 34 bytes - P2WSHOutputSize = 8 + 1 + P2WSHSize + P2WSHOutputSize = BaseOutputSize + P2WSHSize // P2SHSize 23 bytes. P2SHSize = 23 @@ -77,7 +82,7 @@ const ( // - value: 8 bytes // - var_int: 1 byte (pkscript_length) // - pkscript (p2sh): 23 bytes - P2SHOutputSize = 8 + 1 + P2SHSize + P2SHOutputSize = BaseOutputSize + P2SHSize // P2TRSize 34 bytes // - OP_0: 1 byte @@ -89,7 +94,7 @@ const ( // - value: 8 bytes // - var_int: 1 byte (pkscript_length) // - pkscript (p2tr): 34 bytes - P2TROutputSize = 8 + 1 + P2TRSize + P2TROutputSize = BaseOutputSize + P2TRSize // P2PKHScriptSigSize 108 bytes // - OP_DATA: 1 byte (signature length) @@ -1013,6 +1018,14 @@ func (twe *TxWeightEstimator) AddP2SHOutput() *TxWeightEstimator { return twe } +// AddOutput estimates the weight of an output based on the pkScript. +func (twe *TxWeightEstimator) AddOutput(pkScript []byte) *TxWeightEstimator { + twe.outputSize += BaseOutputSize + len(pkScript) + twe.outputCount++ + + return twe +} + // Weight gets the estimated weight of the transaction. func (twe *TxWeightEstimator) Weight() int { txSizeStripped := BaseTxSize + From 17645cd196af0dee223e236aa85dabb23418ef15 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Tue, 6 Feb 2024 12:25:54 +0100 Subject: [PATCH 09/17] multi: add DecorateInputs to WalletController interface This commit adds the new DecorateInputs method of the base wallet to the WalletController interface. --- lntest/mock/walletcontroller.go | 5 +++++ lnwallet/btcwallet/psbt.go | 12 ++++++++++++ lnwallet/interface.go | 6 ++++++ lnwallet/mock.go | 5 +++++ 4 files changed, 28 insertions(+) diff --git a/lntest/mock/walletcontroller.go b/lntest/mock/walletcontroller.go index d641137eb6..6c0f3e6a91 100644 --- a/lntest/mock/walletcontroller.go +++ b/lntest/mock/walletcontroller.go @@ -227,6 +227,11 @@ func (w *WalletController) FinalizePsbt(_ *psbt.Packet, _ string) error { return nil } +// DecorateInputs currently does nothing. +func (w *WalletController) DecorateInputs(*psbt.Packet, bool) error { + return nil +} + // PublishTransaction sends a transaction to the PublishedTransactions chan. func (w *WalletController) PublishTransaction(tx *wire.MsgTx, _ string) error { w.PublishedTransactions <- tx diff --git a/lnwallet/btcwallet/psbt.go b/lnwallet/btcwallet/psbt.go index a91346afad..ffb8fd2fd0 100644 --- a/lnwallet/btcwallet/psbt.go +++ b/lnwallet/btcwallet/psbt.go @@ -596,6 +596,18 @@ func (b *BtcWallet) FinalizePsbt(packet *psbt.Packet, accountName string) error return b.wallet.FinalizePsbt(keyScope, accountNum, packet) } +// DecorateInputs fetches the UTXO information of all inputs it can identify and +// adds the required information to the package's inputs. The failOnUnknown +// boolean controls whether the method should return an error if it cannot +// identify an input or if it should just skip it. +// +// This is a part of the WalletController interface. +func (b *BtcWallet) DecorateInputs(packet *psbt.Packet, + failOnUnknown bool) error { + + return b.wallet.DecorateInputs(packet, failOnUnknown) +} + // lookupFirstCustomAccount returns the first custom account found. In theory, // there should be only one custom account for the given name. However, due to a // lack of check, users could have created custom accounts with various key diff --git a/lnwallet/interface.go b/lnwallet/interface.go index 72f9069fd6..da7630e319 100644 --- a/lnwallet/interface.go +++ b/lnwallet/interface.go @@ -501,6 +501,12 @@ type WalletController interface { // finalized successfully. FinalizePsbt(packet *psbt.Packet, account string) error + // DecorateInputs fetches the UTXO information of all inputs it can + // identify and adds the required information to the package's inputs. + // The failOnUnknown boolean controls whether the method should return + // an error if it cannot identify an input or if it should just skip it. + DecorateInputs(packet *psbt.Packet, failOnUnknown bool) error + // SubscribeTransactions returns a TransactionSubscription client which // is capable of receiving async notifications as new transactions // related to the wallet are seen within the network, or found in diff --git a/lnwallet/mock.go b/lnwallet/mock.go index 476915b5ab..dc59c63acc 100644 --- a/lnwallet/mock.go +++ b/lnwallet/mock.go @@ -235,6 +235,11 @@ func (w *mockWalletController) FinalizePsbt(_ *psbt.Packet, _ string) error { return nil } +// DecorateInputs currently does nothing. +func (w *mockWalletController) DecorateInputs(*psbt.Packet, bool) error { + return nil +} + // PublishTransaction sends a transaction to the PublishedTransactions chan. func (w *mockWalletController) PublishTransaction(tx *wire.MsgTx, _ string) error { From 446152e1a57340f74cee58a4180fc8aabc032d59 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Tue, 6 Feb 2024 12:25:56 +0100 Subject: [PATCH 10/17] walletrpc: refactor to prepare for third funding option In the following commits we'll add a new, third, funding option for funding PSBTs: It will allow users to specify pre-selected inputs but still request the wallet to perform coin selection up to the total output sum amount. --- lnrpc/walletrpc/psbt.go | 9 +- lnrpc/walletrpc/walletkit_server.go | 183 +++++++++++++++++----------- 2 files changed, 113 insertions(+), 79 deletions(-) diff --git a/lnrpc/walletrpc/psbt.go b/lnrpc/walletrpc/psbt.go index e3d02b4a8b..b05d750548 100644 --- a/lnrpc/walletrpc/psbt.go +++ b/lnrpc/walletrpc/psbt.go @@ -8,7 +8,6 @@ import ( "math" "time" - "github.com/btcsuite/btcd/btcutil/psbt" "github.com/btcsuite/btcd/wire" base "github.com/btcsuite/btcwallet/wallet" "github.com/btcsuite/btcwallet/wtxmgr" @@ -49,16 +48,16 @@ func verifyInputsUnspent(inputs []*wire.TxIn, utxos []*lnwallet.Utxo) error { // lockInputs requests a lock lease for all inputs specified in a PSBT packet // by using the internal, static lock ID of lnd's wallet. func lockInputs(w lnwallet.WalletController, - packet *psbt.Packet) ([]*base.ListLeasedOutputResult, error) { + outpoints []wire.OutPoint) ([]*base.ListLeasedOutputResult, error) { locks := make( - []*base.ListLeasedOutputResult, len(packet.UnsignedTx.TxIn), + []*base.ListLeasedOutputResult, len(outpoints), ) - for idx, rawInput := range packet.UnsignedTx.TxIn { + for idx := range outpoints { lock := &base.ListLeasedOutputResult{ LockedOutput: &wtxmgr.LockedOutput{ LockID: LndInternalLockID, - Outpoint: rawInput.PreviousOutPoint, + Outpoint: outpoints[idx], }, } diff --git a/lnrpc/walletrpc/walletkit_server.go b/lnrpc/walletrpc/walletkit_server.go index 88065572df..3a1bc40bbc 100644 --- a/lnrpc/walletrpc/walletkit_server.go +++ b/lnrpc/walletrpc/walletkit_server.go @@ -1175,12 +1175,54 @@ func (w *WalletKit) FundPsbt(_ context.Context, var ( err error - packet *psbt.Packet feeSatPerKW chainfee.SatPerKWeight - locks []*base.ListLeasedOutputResult - rawPsbt bytes.Buffer ) + // Determine the desired transaction fee. + switch { + // Estimate the fee by the target number of blocks to confirmation. + case req.GetTargetConf() != 0: + targetConf := req.GetTargetConf() + if targetConf < 2 { + return nil, fmt.Errorf("confirmation target must be " + + "greater than 1") + } + + feeSatPerKW, err = w.cfg.FeeEstimator.EstimateFeePerKW( + targetConf, + ) + if err != nil { + return nil, fmt.Errorf("could not estimate fee: %w", + err) + } + + // Convert the fee to sat/kW from the specified sat/vByte. + case req.GetSatPerVbyte() != 0: + feeSatPerKW = chainfee.SatPerKVByte( + req.GetSatPerVbyte() * 1000, + ).FeePerKWeight() + + default: + return nil, fmt.Errorf("fee definition missing, need to " + + "specify either target_conf or sat_per_vbyte") + } + + // Then, we'll extract the minimum number of confirmations that each + // output we use to fund the transaction should satisfy. + minConfs, err := lnrpc.ExtractMinConfs( + req.GetMinConfs(), req.GetSpendUnconfirmed(), + ) + if err != nil { + return nil, err + } + + // We'll assume the PSBT will be funded by the default account unless + // otherwise specified. + account := lnwallet.DefaultAccountName + if req.Account != "" { + account = req.Account + } + // There are two ways a user can specify what we call the template (a // list of inputs and outputs to use in the PSBT): Either as a PSBT // packet directly or as a special RPC message. Find out which one the @@ -1189,11 +1231,18 @@ func (w *WalletKit) FundPsbt(_ context.Context, // The template is specified as a PSBT. All we have to do is parse it. case req.GetPsbt() != nil: r := bytes.NewReader(req.GetPsbt()) - packet, err = psbt.NewFromRawBytes(r, false) + packet, err := psbt.NewFromRawBytes(r, false) if err != nil { - return nil, fmt.Errorf("could not parse PSBT: %v", err) + return nil, fmt.Errorf("could not parse PSBT: %w", err) } + // Run the actual funding process now, using the internal + // wallet. + return w.fundPsbtInternalWallet( + account, keyScopeFromChangeAddressType(req.ChangeType), + packet, minConfs, feeSatPerKW, + ) + // The template is specified as a RPC message. We need to create a new // PSBT and copy the RPC information over. case req.GetRaw() != nil: @@ -1218,7 +1267,7 @@ func (w *WalletKit) FundPsbt(_ context.Context, pkScript, err := txscript.PayToAddrScript(addr) if err != nil { return nil, fmt.Errorf("error getting pk "+ - "script for address %s: %v", addrStr, + "script for address %s: %w", addrStr, err) } @@ -1233,73 +1282,42 @@ func (w *WalletKit) FundPsbt(_ context.Context, op, err := UnmarshallOutPoint(in) if err != nil { return nil, fmt.Errorf("error parsing "+ - "outpoint: %v", err) + "outpoint: %w", err) } txIn[idx] = op } sequences := make([]uint32, len(txIn)) - packet, err = psbt.New(txIn, txOut, 2, 0, sequences) + packet, err := psbt.New(txIn, txOut, 2, 0, sequences) if err != nil { - return nil, fmt.Errorf("could not create PSBT: %v", err) - } - - default: - return nil, fmt.Errorf("transaction template missing, need " + - "to specify either PSBT or raw TX template") - } - - // Determine the desired transaction fee. - switch { - // Estimate the fee by the target number of blocks to confirmation. - case req.GetTargetConf() != 0: - targetConf := req.GetTargetConf() - if targetConf < 2 { - return nil, fmt.Errorf("confirmation target must be " + - "greater than 1") + return nil, fmt.Errorf("could not create PSBT: %w", err) } - feeSatPerKW, err = w.cfg.FeeEstimator.EstimateFeePerKW( - targetConf, + // Run the actual funding process now, using the internal + // wallet. + return w.fundPsbtInternalWallet( + account, keyScopeFromChangeAddressType(req.ChangeType), + packet, minConfs, feeSatPerKW, ) - if err != nil { - return nil, fmt.Errorf("could not estimate fee: %v", - err) - } - - // Convert the fee to sat/kW from the specified sat/vByte. - case req.GetSatPerVbyte() != 0: - feeSatPerKW = chainfee.SatPerKVByte( - req.GetSatPerVbyte() * 1000, - ).FeePerKWeight() default: - return nil, fmt.Errorf("fee definition missing, need to " + - "specify either target_conf or sat_per_vbyte") + return nil, fmt.Errorf("transaction template missing, need " + + "to specify either PSBT or raw TX template") } +} - // Then, we'll extract the minimum number of confirmations that each - // output we use to fund the transaction should satisfy. - minConfs, err := lnrpc.ExtractMinConfs( - req.GetMinConfs(), req.GetSpendUnconfirmed(), - ) - if err != nil { - return nil, err - } +// fundPsbtInternalWallet uses the "old" PSBT funding method of the internal +// wallet that does not allow specifying custom inputs while selecting coins. +func (w *WalletKit) fundPsbtInternalWallet(account string, + keyScope *waddrmgr.KeyScope, packet *psbt.Packet, minConfs int32, + feeSatPerKW chainfee.SatPerKWeight) (*FundPsbtResponse, error) { // The RPC parsing part is now over. Several of the following operations - // require us to hold the global coin selection lock so we do the rest + // require us to hold the global coin selection lock, so we do the rest // of the tasks while holding the lock. The result is a list of locked // UTXOs. - changeIndex := int32(-1) - err = w.cfg.CoinSelectionLocker.WithCoinSelectLock(func() error { - // We'll assume the PSBT will be funded by the default account - // unless otherwise specified. - account := lnwallet.DefaultAccountName - if req.Account != "" { - account = req.Account - } - + var response *FundPsbtResponse + err := w.cfg.CoinSelectionLocker.WithCoinSelectLock(func() error { // In case the user did specify inputs, we need to make sure // they are known to us, still unspent and not yet locked. if len(packet.UnsignedTx.TxIn) > 0 { @@ -1323,47 +1341,64 @@ func (w *WalletKit) FundPsbt(_ context.Context, // We can now ask the wallet to fund the TX. This will not yet // lock any coins but might still change the wallet DB by // generating a new change address. - changeIndex, err = w.cfg.Wallet.FundPsbt( - packet, minConfs, feeSatPerKW, account, - keyScopeFromChangeAddressType(req.ChangeType), + changeIndex, err := w.cfg.Wallet.FundPsbt( + packet, minConfs, feeSatPerKW, account, keyScope, ) if err != nil { return fmt.Errorf("wallet couldn't fund PSBT: %v", err) } - // Make sure we can properly serialize the packet. If this goes - // wrong then something isn't right with the inputs and we - // probably shouldn't try to lock any of them. - err = packet.Serialize(&rawPsbt) - if err != nil { - return fmt.Errorf("error serializing funded PSBT: %v", - err) - } - // Now we have obtained a set of coins that can be used to fund // the TX. Let's lock them to be sure they aren't spent by the // time the PSBT is published. This is the action we do here - // that could cause an error. Therefore if some of the UTXOs + // that could cause an error. Therefore, if some of the UTXOs // cannot be locked, the rollback of the other's locks also // happens in this function. If we ever need to do more after // this function, we need to extract the rollback needs to be // extracted into a defer. - locks, err = lockInputs(w.cfg.Wallet, packet) - if err != nil { - return fmt.Errorf("could not lock inputs: %v", err) + outpoints := make([]wire.OutPoint, len(packet.UnsignedTx.TxIn)) + for i, txIn := range packet.UnsignedTx.TxIn { + outpoints[i] = txIn.PreviousOutPoint } - return nil + response, err = w.lockAndCreateFundingResponse( + packet, outpoints, changeIndex, + ) + + return err }) if err != nil { return nil, err } + return response, nil +} + +// lockAndCreateFundingResponse locks the given outpoints and creates a funding +// response with the serialized PSBT, the change index and the locked UTXOs. +func (w *WalletKit) lockAndCreateFundingResponse(packet *psbt.Packet, + newOutpoints []wire.OutPoint, changeIndex int32) (*FundPsbtResponse, + error) { + + // Make sure we can properly serialize the packet. If this goes wrong + // then something isn't right with the inputs, and we probably shouldn't + // try to lock any of them. + var buf bytes.Buffer + err := packet.Serialize(&buf) + if err != nil { + return nil, fmt.Errorf("error serializing funded PSBT: %w", err) + } + + locks, err := lockInputs(w.cfg.Wallet, newOutpoints) + if err != nil { + return nil, fmt.Errorf("could not lock inputs: %w", err) + } + // Convert the lock leases to the RPC format. rpcLocks := marshallLeases(locks) return &FundPsbtResponse{ - FundedPsbt: rawPsbt.Bytes(), + FundedPsbt: buf.Bytes(), ChangeOutputIndex: changeIndex, LockedUtxos: rpcLocks, }, nil From 0f6c25a77325fe92c26ef24bdc632e84512e6070 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Tue, 6 Feb 2024 12:25:57 +0100 Subject: [PATCH 11/17] walletrpc: add PsbtCoinSelect option to FundPsbt --- lnrpc/walletrpc/walletkit.pb.go | 1012 ++++++++++++++---------- lnrpc/walletrpc/walletkit.proto | 83 +- lnrpc/walletrpc/walletkit.swagger.json | 29 +- lnrpc/walletrpc/walletkit_grpc.pb.go | 52 +- lnrpc/walletrpc/walletkit_server.go | 25 +- 5 files changed, 742 insertions(+), 459 deletions(-) diff --git a/lnrpc/walletrpc/walletkit.pb.go b/lnrpc/walletrpc/walletkit.pb.go index c9f1e113e9..ef6ca4c8db 100644 --- a/lnrpc/walletrpc/walletkit.pb.go +++ b/lnrpc/walletrpc/walletkit.pb.go @@ -3384,6 +3384,7 @@ type FundPsbtRequest struct { // // *FundPsbtRequest_Psbt // *FundPsbtRequest_Raw + // *FundPsbtRequest_CoinSelect Template isFundPsbtRequest_Template `protobuf_oneof:"template"` // Types that are assignable to Fees: // @@ -3458,6 +3459,13 @@ func (x *FundPsbtRequest) GetRaw() *TxTemplate { return nil } +func (x *FundPsbtRequest) GetCoinSelect() *PsbtCoinSelect { + if x, ok := x.GetTemplate().(*FundPsbtRequest_CoinSelect); ok { + return x.CoinSelect + } + return nil +} + func (m *FundPsbtRequest) GetFees() isFundPsbtRequest_Fees { if m != nil { return m.Fees @@ -3528,10 +3536,32 @@ type FundPsbtRequest_Raw struct { Raw *TxTemplate `protobuf:"bytes,2,opt,name=raw,proto3,oneof"` } +type FundPsbtRequest_CoinSelect struct { + // Use an existing PSBT packet as the template for the funded PSBT. + // + // The difference to the pure PSBT template above is that coin selection is + // performed even if inputs are specified. The output amounts are summed up + // and used as the target amount for coin selection. A change output must + // either already exist in the PSBT and be marked as such, otherwise a new + // change output of the specified output type will be added. Any inputs + // already specified in the PSBT must already be locked (if they belong to + // this node), only newly added inputs will be locked by this RPC. + // + // In case the sum of the already provided inputs exceeds the required + // output amount, no new coins are selected. Instead only the fee and + // change amount calculation is performed (e.g. a change output is added if + // requested or the change is added to the specified existing change + // output, given there is any non-dust change). This can be identified by + // the returned locked UTXOs being empty. + CoinSelect *PsbtCoinSelect `protobuf:"bytes,9,opt,name=coin_select,json=coinSelect,proto3,oneof"` +} + func (*FundPsbtRequest_Psbt) isFundPsbtRequest_Template() {} func (*FundPsbtRequest_Raw) isFundPsbtRequest_Template() {} +func (*FundPsbtRequest_CoinSelect) isFundPsbtRequest_Template() {} + type isFundPsbtRequest_Fees interface { isFundPsbtRequest_Fees() } @@ -3561,7 +3591,8 @@ type FundPsbtResponse struct { // The index of the added change output or -1 if no change was left over. ChangeOutputIndex int32 `protobuf:"varint,2,opt,name=change_output_index,json=changeOutputIndex,proto3" json:"change_output_index,omitempty"` // The list of lock leases that were acquired for the inputs in the funded PSBT - // packet. + // packet. Only inputs added to the PSBT by this RPC are locked, inputs that + // were already present in the PSBT are not locked. LockedUtxos []*UtxoLease `protobuf:"bytes,3,rep,name=locked_utxos,json=lockedUtxos,proto3" json:"locked_utxos,omitempty"` } @@ -3681,6 +3712,111 @@ func (x *TxTemplate) GetOutputs() map[string]uint64 { return nil } +type PsbtCoinSelect struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The template to use for the funded PSBT. The template must contain at least + // one non-dust output. The amount to be funded is calculated by summing up the + // amounts of all outputs in the template, subtracting all the input values of + // the already specified inputs. The change value is added to the output that + // is marked as such (or a new change output is added if none is marked). For + // the input amount calculation to be correct, the template must have the + // WitnessUtxo field set for all inputs. Any inputs already specified in the + // PSBT must already be locked (if they belong to this node), only newly added + // inputs will be locked by this RPC. + Psbt []byte `protobuf:"bytes,1,opt,name=psbt,proto3" json:"psbt,omitempty"` + // Types that are assignable to ChangeOutput: + // + // *PsbtCoinSelect_ExistingOutputIndex + // *PsbtCoinSelect_Add + ChangeOutput isPsbtCoinSelect_ChangeOutput `protobuf_oneof:"change_output"` +} + +func (x *PsbtCoinSelect) Reset() { + *x = PsbtCoinSelect{} + if protoimpl.UnsafeEnabled { + mi := &file_walletrpc_walletkit_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PsbtCoinSelect) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PsbtCoinSelect) ProtoMessage() {} + +func (x *PsbtCoinSelect) ProtoReflect() protoreflect.Message { + mi := &file_walletrpc_walletkit_proto_msgTypes[51] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PsbtCoinSelect.ProtoReflect.Descriptor instead. +func (*PsbtCoinSelect) Descriptor() ([]byte, []int) { + return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{51} +} + +func (x *PsbtCoinSelect) GetPsbt() []byte { + if x != nil { + return x.Psbt + } + return nil +} + +func (m *PsbtCoinSelect) GetChangeOutput() isPsbtCoinSelect_ChangeOutput { + if m != nil { + return m.ChangeOutput + } + return nil +} + +func (x *PsbtCoinSelect) GetExistingOutputIndex() int32 { + if x, ok := x.GetChangeOutput().(*PsbtCoinSelect_ExistingOutputIndex); ok { + return x.ExistingOutputIndex + } + return 0 +} + +func (x *PsbtCoinSelect) GetAdd() bool { + if x, ok := x.GetChangeOutput().(*PsbtCoinSelect_Add); ok { + return x.Add + } + return false +} + +type isPsbtCoinSelect_ChangeOutput interface { + isPsbtCoinSelect_ChangeOutput() +} + +type PsbtCoinSelect_ExistingOutputIndex struct { + // Use the existing output within the template PSBT with the specified + // index as the change output. Any leftover change will be added to the + // already specified amount of that output. To add a new change output to + // the PSBT, set the "add" field below instead. The type of change output + // added is defined by change_type in the parent message. + ExistingOutputIndex int32 `protobuf:"varint,2,opt,name=existing_output_index,json=existingOutputIndex,proto3,oneof"` +} + +type PsbtCoinSelect_Add struct { + // Add a new change output to the PSBT using the change_type specified in + // the parent message. + Add bool `protobuf:"varint,3,opt,name=add,proto3,oneof"` +} + +func (*PsbtCoinSelect_ExistingOutputIndex) isPsbtCoinSelect_ChangeOutput() {} + +func (*PsbtCoinSelect_Add) isPsbtCoinSelect_ChangeOutput() {} + type UtxoLease struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -3701,7 +3837,7 @@ type UtxoLease struct { func (x *UtxoLease) Reset() { *x = UtxoLease{} if protoimpl.UnsafeEnabled { - mi := &file_walletrpc_walletkit_proto_msgTypes[51] + mi := &file_walletrpc_walletkit_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3714,7 +3850,7 @@ func (x *UtxoLease) String() string { func (*UtxoLease) ProtoMessage() {} func (x *UtxoLease) ProtoReflect() protoreflect.Message { - mi := &file_walletrpc_walletkit_proto_msgTypes[51] + mi := &file_walletrpc_walletkit_proto_msgTypes[52] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3727,7 +3863,7 @@ func (x *UtxoLease) ProtoReflect() protoreflect.Message { // Deprecated: Use UtxoLease.ProtoReflect.Descriptor instead. func (*UtxoLease) Descriptor() ([]byte, []int) { - return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{51} + return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{52} } func (x *UtxoLease) GetId() []byte { @@ -3778,7 +3914,7 @@ type SignPsbtRequest struct { func (x *SignPsbtRequest) Reset() { *x = SignPsbtRequest{} if protoimpl.UnsafeEnabled { - mi := &file_walletrpc_walletkit_proto_msgTypes[52] + mi := &file_walletrpc_walletkit_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3791,7 +3927,7 @@ func (x *SignPsbtRequest) String() string { func (*SignPsbtRequest) ProtoMessage() {} func (x *SignPsbtRequest) ProtoReflect() protoreflect.Message { - mi := &file_walletrpc_walletkit_proto_msgTypes[52] + mi := &file_walletrpc_walletkit_proto_msgTypes[53] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3804,7 +3940,7 @@ func (x *SignPsbtRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SignPsbtRequest.ProtoReflect.Descriptor instead. func (*SignPsbtRequest) Descriptor() ([]byte, []int) { - return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{52} + return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{53} } func (x *SignPsbtRequest) GetFundedPsbt() []byte { @@ -3828,7 +3964,7 @@ type SignPsbtResponse struct { func (x *SignPsbtResponse) Reset() { *x = SignPsbtResponse{} if protoimpl.UnsafeEnabled { - mi := &file_walletrpc_walletkit_proto_msgTypes[53] + mi := &file_walletrpc_walletkit_proto_msgTypes[54] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3841,7 +3977,7 @@ func (x *SignPsbtResponse) String() string { func (*SignPsbtResponse) ProtoMessage() {} func (x *SignPsbtResponse) ProtoReflect() protoreflect.Message { - mi := &file_walletrpc_walletkit_proto_msgTypes[53] + mi := &file_walletrpc_walletkit_proto_msgTypes[54] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3854,7 +3990,7 @@ func (x *SignPsbtResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SignPsbtResponse.ProtoReflect.Descriptor instead. func (*SignPsbtResponse) Descriptor() ([]byte, []int) { - return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{53} + return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{54} } func (x *SignPsbtResponse) GetSignedPsbt() []byte { @@ -3888,7 +4024,7 @@ type FinalizePsbtRequest struct { func (x *FinalizePsbtRequest) Reset() { *x = FinalizePsbtRequest{} if protoimpl.UnsafeEnabled { - mi := &file_walletrpc_walletkit_proto_msgTypes[54] + mi := &file_walletrpc_walletkit_proto_msgTypes[55] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3901,7 +4037,7 @@ func (x *FinalizePsbtRequest) String() string { func (*FinalizePsbtRequest) ProtoMessage() {} func (x *FinalizePsbtRequest) ProtoReflect() protoreflect.Message { - mi := &file_walletrpc_walletkit_proto_msgTypes[54] + mi := &file_walletrpc_walletkit_proto_msgTypes[55] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3914,7 +4050,7 @@ func (x *FinalizePsbtRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use FinalizePsbtRequest.ProtoReflect.Descriptor instead. func (*FinalizePsbtRequest) Descriptor() ([]byte, []int) { - return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{54} + return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{55} } func (x *FinalizePsbtRequest) GetFundedPsbt() []byte { @@ -3945,7 +4081,7 @@ type FinalizePsbtResponse struct { func (x *FinalizePsbtResponse) Reset() { *x = FinalizePsbtResponse{} if protoimpl.UnsafeEnabled { - mi := &file_walletrpc_walletkit_proto_msgTypes[55] + mi := &file_walletrpc_walletkit_proto_msgTypes[56] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3958,7 +4094,7 @@ func (x *FinalizePsbtResponse) String() string { func (*FinalizePsbtResponse) ProtoMessage() {} func (x *FinalizePsbtResponse) ProtoReflect() protoreflect.Message { - mi := &file_walletrpc_walletkit_proto_msgTypes[55] + mi := &file_walletrpc_walletkit_proto_msgTypes[56] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3971,7 +4107,7 @@ func (x *FinalizePsbtResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use FinalizePsbtResponse.ProtoReflect.Descriptor instead. func (*FinalizePsbtResponse) Descriptor() ([]byte, []int) { - return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{55} + return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{56} } func (x *FinalizePsbtResponse) GetSignedPsbt() []byte { @@ -3997,7 +4133,7 @@ type ListLeasesRequest struct { func (x *ListLeasesRequest) Reset() { *x = ListLeasesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_walletrpc_walletkit_proto_msgTypes[56] + mi := &file_walletrpc_walletkit_proto_msgTypes[57] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4010,7 +4146,7 @@ func (x *ListLeasesRequest) String() string { func (*ListLeasesRequest) ProtoMessage() {} func (x *ListLeasesRequest) ProtoReflect() protoreflect.Message { - mi := &file_walletrpc_walletkit_proto_msgTypes[56] + mi := &file_walletrpc_walletkit_proto_msgTypes[57] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4023,7 +4159,7 @@ func (x *ListLeasesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListLeasesRequest.ProtoReflect.Descriptor instead. func (*ListLeasesRequest) Descriptor() ([]byte, []int) { - return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{56} + return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{57} } type ListLeasesResponse struct { @@ -4038,7 +4174,7 @@ type ListLeasesResponse struct { func (x *ListLeasesResponse) Reset() { *x = ListLeasesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_walletrpc_walletkit_proto_msgTypes[57] + mi := &file_walletrpc_walletkit_proto_msgTypes[58] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4051,7 +4187,7 @@ func (x *ListLeasesResponse) String() string { func (*ListLeasesResponse) ProtoMessage() {} func (x *ListLeasesResponse) ProtoReflect() protoreflect.Message { - mi := &file_walletrpc_walletkit_proto_msgTypes[57] + mi := &file_walletrpc_walletkit_proto_msgTypes[58] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4064,7 +4200,7 @@ func (x *ListLeasesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListLeasesResponse.ProtoReflect.Descriptor instead. func (*ListLeasesResponse) Descriptor() ([]byte, []int) { - return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{57} + return file_walletrpc_walletkit_proto_rawDescGZIP(), []int{58} } func (x *ListLeasesResponse) GetLockedUtxos() []*UtxoLease { @@ -4088,7 +4224,7 @@ type ListSweepsResponse_TransactionIDs struct { func (x *ListSweepsResponse_TransactionIDs) Reset() { *x = ListSweepsResponse_TransactionIDs{} if protoimpl.UnsafeEnabled { - mi := &file_walletrpc_walletkit_proto_msgTypes[58] + mi := &file_walletrpc_walletkit_proto_msgTypes[59] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4101,7 +4237,7 @@ func (x *ListSweepsResponse_TransactionIDs) String() string { func (*ListSweepsResponse_TransactionIDs) ProtoMessage() {} func (x *ListSweepsResponse_TransactionIDs) ProtoReflect() protoreflect.Message { - mi := &file_walletrpc_walletkit_proto_msgTypes[58] + mi := &file_walletrpc_walletkit_proto_msgTypes[59] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4465,319 +4601,330 @@ var file_walletrpc_walletkit_proto_rawDesc = []byte{ 0x72, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6f, 0x76, 0x65, 0x72, 0x77, 0x72, 0x69, 0x74, 0x65, 0x22, 0x1a, 0x0a, 0x18, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0xd2, 0x02, 0x0a, 0x0f, 0x46, 0x75, 0x6e, 0x64, 0x50, 0x73, 0x62, 0x74, + 0x6e, 0x73, 0x65, 0x22, 0x90, 0x03, 0x0a, 0x0f, 0x46, 0x75, 0x6e, 0x64, 0x50, 0x73, 0x62, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x04, 0x70, 0x73, 0x62, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x04, 0x70, 0x73, 0x62, 0x74, 0x12, 0x29, 0x0a, 0x03, 0x72, 0x61, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, - 0x65, 0x48, 0x00, 0x52, 0x03, 0x72, 0x61, 0x77, 0x12, 0x21, 0x0a, 0x0b, 0x74, 0x61, 0x72, 0x67, - 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, - 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x24, 0x0a, 0x0d, 0x73, - 0x61, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x76, 0x62, 0x79, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x04, 0x48, 0x01, 0x52, 0x0b, 0x73, 0x61, 0x74, 0x50, 0x65, 0x72, 0x56, 0x62, 0x79, 0x74, - 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, - 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, - 0x6d, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x70, 0x65, 0x6e, - 0x64, 0x5f, 0x75, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x10, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x55, 0x6e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x72, 0x6d, 0x65, 0x64, 0x12, 0x3d, 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x77, 0x61, 0x6c, - 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x42, 0x06, 0x0a, 0x04, 0x66, 0x65, 0x65, 0x73, 0x22, 0x9c, 0x01, 0x0a, 0x10, 0x46, 0x75, 0x6e, - 0x64, 0x50, 0x73, 0x62, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, - 0x0b, 0x66, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x70, 0x73, 0x62, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x0a, 0x66, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x50, 0x73, 0x62, 0x74, 0x12, 0x2e, - 0x0a, 0x13, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, - 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x63, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x37, - 0x0a, 0x0c, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x75, 0x74, 0x78, 0x6f, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, - 0x2e, 0x55, 0x74, 0x78, 0x6f, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x0b, 0x6c, 0x6f, 0x63, 0x6b, - 0x65, 0x64, 0x55, 0x74, 0x78, 0x6f, 0x73, 0x22, 0xaf, 0x01, 0x0a, 0x0a, 0x54, 0x78, 0x54, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x27, 0x0a, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4f, - 0x75, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x12, - 0x3c, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x22, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x78, 0x54, - 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x1a, 0x3a, 0x0a, - 0x0c, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x9b, 0x01, 0x0a, 0x09, 0x55, 0x74, - 0x78, 0x6f, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2b, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6c, 0x6e, 0x72, 0x70, - 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x08, 0x6f, 0x75, 0x74, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6b, 0x5f, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x70, 0x6b, 0x53, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x32, 0x0a, 0x0f, 0x53, 0x69, 0x67, 0x6e, 0x50, - 0x73, 0x62, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x75, - 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x70, 0x73, 0x62, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x0a, 0x66, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x50, 0x73, 0x62, 0x74, 0x22, 0x58, 0x0a, 0x10, 0x53, - 0x69, 0x67, 0x6e, 0x50, 0x73, 0x62, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x1f, 0x0a, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x70, 0x73, 0x62, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x73, 0x62, 0x74, - 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x49, - 0x6e, 0x70, 0x75, 0x74, 0x73, 0x22, 0x50, 0x0a, 0x13, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, - 0x65, 0x50, 0x73, 0x62, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, - 0x66, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x70, 0x73, 0x62, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x0a, 0x66, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x50, 0x73, 0x62, 0x74, 0x12, 0x18, 0x0a, - 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x59, 0x0a, 0x14, 0x46, 0x69, 0x6e, 0x61, 0x6c, - 0x69, 0x7a, 0x65, 0x50, 0x73, 0x62, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x1f, 0x0a, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x70, 0x73, 0x62, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x73, 0x62, 0x74, - 0x12, 0x20, 0x0a, 0x0c, 0x72, 0x61, 0x77, 0x5f, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x78, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x72, 0x61, 0x77, 0x46, 0x69, 0x6e, 0x61, 0x6c, - 0x54, 0x78, 0x22, 0x13, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4d, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x4c, - 0x65, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, - 0x0c, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x75, 0x74, 0x78, 0x6f, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, - 0x55, 0x74, 0x78, 0x6f, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x0b, 0x6c, 0x6f, 0x63, 0x6b, 0x65, - 0x64, 0x55, 0x74, 0x78, 0x6f, 0x73, 0x2a, 0x8e, 0x01, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, - 0x4e, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x57, 0x49, 0x54, 0x4e, 0x45, 0x53, 0x53, 0x5f, 0x50, - 0x55, 0x42, 0x4b, 0x45, 0x59, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x10, 0x01, 0x12, 0x1e, 0x0a, 0x1a, - 0x4e, 0x45, 0x53, 0x54, 0x45, 0x44, 0x5f, 0x57, 0x49, 0x54, 0x4e, 0x45, 0x53, 0x53, 0x5f, 0x50, - 0x55, 0x42, 0x4b, 0x45, 0x59, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x10, 0x02, 0x12, 0x25, 0x0a, 0x21, - 0x48, 0x59, 0x42, 0x52, 0x49, 0x44, 0x5f, 0x4e, 0x45, 0x53, 0x54, 0x45, 0x44, 0x5f, 0x57, 0x49, - 0x54, 0x4e, 0x45, 0x53, 0x53, 0x5f, 0x50, 0x55, 0x42, 0x4b, 0x45, 0x59, 0x5f, 0x48, 0x41, 0x53, - 0x48, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x50, - 0x55, 0x42, 0x4b, 0x45, 0x59, 0x10, 0x04, 0x2a, 0xfb, 0x09, 0x0a, 0x0b, 0x57, 0x69, 0x74, 0x6e, - 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x13, 0x0a, 0x0f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, - 0x57, 0x4e, 0x5f, 0x57, 0x49, 0x54, 0x4e, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, - 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x5f, - 0x4c, 0x4f, 0x43, 0x4b, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, - 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x4e, 0x4f, 0x5f, 0x44, 0x45, 0x4c, 0x41, 0x59, 0x10, 0x02, 0x12, - 0x15, 0x0a, 0x11, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x52, 0x45, - 0x56, 0x4f, 0x4b, 0x45, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x4f, - 0x46, 0x46, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x56, 0x4f, 0x4b, 0x45, 0x10, 0x04, 0x12, - 0x18, 0x0a, 0x14, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, - 0x5f, 0x52, 0x45, 0x56, 0x4f, 0x4b, 0x45, 0x10, 0x05, 0x12, 0x25, 0x0a, 0x21, 0x48, 0x54, 0x4c, + 0x65, 0x48, 0x00, 0x52, 0x03, 0x72, 0x61, 0x77, 0x12, 0x3c, 0x0a, 0x0b, 0x63, 0x6f, 0x69, 0x6e, + 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x73, 0x62, 0x74, 0x43, 0x6f, + 0x69, 0x6e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x6f, 0x69, 0x6e, + 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x12, 0x21, 0x0a, 0x0b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0a, 0x74, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x61, 0x74, + 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x76, 0x62, 0x79, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, + 0x48, 0x01, 0x52, 0x0b, 0x73, 0x61, 0x74, 0x50, 0x65, 0x72, 0x56, 0x62, 0x79, 0x74, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6d, 0x69, + 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x5f, + 0x75, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x10, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x55, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, + 0x6d, 0x65, 0x64, 0x12, 0x3d, 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, + 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x42, 0x06, + 0x0a, 0x04, 0x66, 0x65, 0x65, 0x73, 0x22, 0x9c, 0x01, 0x0a, 0x10, 0x46, 0x75, 0x6e, 0x64, 0x50, + 0x73, 0x62, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x66, + 0x75, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x70, 0x73, 0x62, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x0a, 0x66, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x50, 0x73, 0x62, 0x74, 0x12, 0x2e, 0x0a, 0x13, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x37, 0x0a, 0x0c, + 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x75, 0x74, 0x78, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x55, + 0x74, 0x78, 0x6f, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x0b, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, + 0x55, 0x74, 0x78, 0x6f, 0x73, 0x22, 0xaf, 0x01, 0x0a, 0x0a, 0x54, 0x78, 0x54, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x12, 0x27, 0x0a, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, + 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x12, 0x3c, 0x0a, + 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, + 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x78, 0x54, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, 0x4f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x7f, 0x0a, 0x0e, 0x50, 0x73, 0x62, 0x74, 0x43, + 0x6f, 0x69, 0x6e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x73, 0x62, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x70, 0x73, 0x62, 0x74, 0x12, 0x34, 0x0a, + 0x15, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x13, + 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x12, 0x12, 0x0a, 0x03, 0x61, 0x64, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, + 0x48, 0x00, 0x52, 0x03, 0x61, 0x64, 0x64, 0x42, 0x0f, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x22, 0x9b, 0x01, 0x0a, 0x09, 0x55, 0x74, 0x78, + 0x6f, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2b, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, + 0x2e, 0x4f, 0x75, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6b, 0x5f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x70, 0x6b, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x32, 0x0a, 0x0f, 0x53, 0x69, 0x67, 0x6e, 0x50, 0x73, + 0x62, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x75, 0x6e, + 0x64, 0x65, 0x64, 0x5f, 0x70, 0x73, 0x62, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, + 0x66, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x50, 0x73, 0x62, 0x74, 0x22, 0x58, 0x0a, 0x10, 0x53, 0x69, + 0x67, 0x6e, 0x50, 0x73, 0x62, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, + 0x0a, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x70, 0x73, 0x62, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x73, 0x62, 0x74, 0x12, + 0x23, 0x0a, 0x0d, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x49, 0x6e, + 0x70, 0x75, 0x74, 0x73, 0x22, 0x50, 0x0a, 0x13, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, + 0x50, 0x73, 0x62, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x66, + 0x75, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x70, 0x73, 0x62, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x0a, 0x66, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x50, 0x73, 0x62, 0x74, 0x12, 0x18, 0x0a, 0x07, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x59, 0x0a, 0x14, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, + 0x7a, 0x65, 0x50, 0x73, 0x62, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, + 0x0a, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x70, 0x73, 0x62, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x73, 0x62, 0x74, 0x12, + 0x20, 0x0a, 0x0c, 0x72, 0x61, 0x77, 0x5f, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x78, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x72, 0x61, 0x77, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x54, + 0x78, 0x22, 0x13, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4d, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x65, + 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0c, + 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x75, 0x74, 0x78, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x55, + 0x74, 0x78, 0x6f, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x0b, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, + 0x55, 0x74, 0x78, 0x6f, 0x73, 0x2a, 0x8e, 0x01, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, + 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x57, 0x49, 0x54, 0x4e, 0x45, 0x53, 0x53, 0x5f, 0x50, 0x55, + 0x42, 0x4b, 0x45, 0x59, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x10, 0x01, 0x12, 0x1e, 0x0a, 0x1a, 0x4e, + 0x45, 0x53, 0x54, 0x45, 0x44, 0x5f, 0x57, 0x49, 0x54, 0x4e, 0x45, 0x53, 0x53, 0x5f, 0x50, 0x55, + 0x42, 0x4b, 0x45, 0x59, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x10, 0x02, 0x12, 0x25, 0x0a, 0x21, 0x48, + 0x59, 0x42, 0x52, 0x49, 0x44, 0x5f, 0x4e, 0x45, 0x53, 0x54, 0x45, 0x44, 0x5f, 0x57, 0x49, 0x54, + 0x4e, 0x45, 0x53, 0x53, 0x5f, 0x50, 0x55, 0x42, 0x4b, 0x45, 0x59, 0x5f, 0x48, 0x41, 0x53, 0x48, + 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x50, 0x55, + 0x42, 0x4b, 0x45, 0x59, 0x10, 0x04, 0x2a, 0xfb, 0x09, 0x0a, 0x0b, 0x57, 0x69, 0x74, 0x6e, 0x65, + 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x13, 0x0a, 0x0f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, + 0x4e, 0x5f, 0x57, 0x49, 0x54, 0x4e, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x43, + 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x4c, + 0x4f, 0x43, 0x4b, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x4d, + 0x45, 0x4e, 0x54, 0x5f, 0x4e, 0x4f, 0x5f, 0x44, 0x45, 0x4c, 0x41, 0x59, 0x10, 0x02, 0x12, 0x15, + 0x0a, 0x11, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x56, + 0x4f, 0x4b, 0x45, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x4f, 0x46, + 0x46, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x56, 0x4f, 0x4b, 0x45, 0x10, 0x04, 0x12, 0x18, + 0x0a, 0x14, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x5f, + 0x52, 0x45, 0x56, 0x4f, 0x4b, 0x45, 0x10, 0x05, 0x12, 0x25, 0x0a, 0x21, 0x48, 0x54, 0x4c, 0x43, + 0x5f, 0x4f, 0x46, 0x46, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, + 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x10, 0x06, 0x12, + 0x26, 0x0a, 0x22, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, + 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x5f, + 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x10, 0x07, 0x12, 0x1f, 0x0a, 0x1b, 0x48, 0x54, 0x4c, 0x43, 0x5f, + 0x4f, 0x46, 0x46, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x54, + 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x08, 0x12, 0x20, 0x0a, 0x1c, 0x48, 0x54, 0x4c, 0x43, + 0x5f, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, + 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x09, 0x12, 0x1c, 0x0a, 0x18, 0x48, 0x54, + 0x4c, 0x43, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, + 0x52, 0x45, 0x56, 0x4f, 0x4b, 0x45, 0x10, 0x0a, 0x12, 0x14, 0x0a, 0x10, 0x57, 0x49, 0x54, 0x4e, + 0x45, 0x53, 0x53, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x10, 0x0b, 0x12, 0x1b, + 0x0a, 0x17, 0x4e, 0x45, 0x53, 0x54, 0x45, 0x44, 0x5f, 0x57, 0x49, 0x54, 0x4e, 0x45, 0x53, 0x53, + 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x10, 0x0c, 0x12, 0x15, 0x0a, 0x11, 0x43, + 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x41, 0x4e, 0x43, 0x48, 0x4f, 0x52, + 0x10, 0x0d, 0x12, 0x21, 0x0a, 0x1d, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x4d, 0x45, 0x4e, 0x54, + 0x5f, 0x4e, 0x4f, 0x5f, 0x44, 0x45, 0x4c, 0x41, 0x59, 0x5f, 0x54, 0x57, 0x45, 0x41, 0x4b, 0x4c, + 0x45, 0x53, 0x53, 0x10, 0x0e, 0x12, 0x22, 0x0a, 0x1e, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x4d, + 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x43, 0x4f, + 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x10, 0x0f, 0x12, 0x35, 0x0a, 0x31, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x4f, 0x46, 0x46, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, - 0x54, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x10, 0x06, - 0x12, 0x26, 0x0a, 0x22, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, + 0x54, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x49, + 0x4e, 0x50, 0x55, 0x54, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x10, 0x10, + 0x12, 0x36, 0x0a, 0x32, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, - 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x10, 0x07, 0x12, 0x1f, 0x0a, 0x1b, 0x48, 0x54, 0x4c, 0x43, - 0x5f, 0x4f, 0x46, 0x46, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, - 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x08, 0x12, 0x20, 0x0a, 0x1c, 0x48, 0x54, 0x4c, - 0x43, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x54, - 0x45, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x09, 0x12, 0x1c, 0x0a, 0x18, 0x48, - 0x54, 0x4c, 0x43, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, - 0x5f, 0x52, 0x45, 0x56, 0x4f, 0x4b, 0x45, 0x10, 0x0a, 0x12, 0x14, 0x0a, 0x10, 0x57, 0x49, 0x54, - 0x4e, 0x45, 0x53, 0x53, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x10, 0x0b, 0x12, - 0x1b, 0x0a, 0x17, 0x4e, 0x45, 0x53, 0x54, 0x45, 0x44, 0x5f, 0x57, 0x49, 0x54, 0x4e, 0x45, 0x53, - 0x53, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x10, 0x0c, 0x12, 0x15, 0x0a, 0x11, - 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x41, 0x4e, 0x43, 0x48, 0x4f, - 0x52, 0x10, 0x0d, 0x12, 0x21, 0x0a, 0x1d, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x4d, 0x45, 0x4e, - 0x54, 0x5f, 0x4e, 0x4f, 0x5f, 0x44, 0x45, 0x4c, 0x41, 0x59, 0x5f, 0x54, 0x57, 0x45, 0x41, 0x4b, - 0x4c, 0x45, 0x53, 0x53, 0x10, 0x0e, 0x12, 0x22, 0x0a, 0x1e, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, - 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x43, - 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x10, 0x0f, 0x12, 0x35, 0x0a, 0x31, 0x48, 0x54, - 0x4c, 0x43, 0x5f, 0x4f, 0x46, 0x46, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, - 0x55, 0x54, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, - 0x49, 0x4e, 0x50, 0x55, 0x54, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x10, - 0x10, 0x12, 0x36, 0x0a, 0x32, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, - 0x45, 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, - 0x44, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x49, 0x4e, 0x50, 0x55, 0x54, 0x5f, 0x43, 0x4f, - 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x10, 0x11, 0x12, 0x1e, 0x0a, 0x1a, 0x4c, 0x45, 0x41, - 0x53, 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x49, - 0x4d, 0x45, 0x5f, 0x4c, 0x4f, 0x43, 0x4b, 0x10, 0x12, 0x12, 0x28, 0x0a, 0x24, 0x4c, 0x45, 0x41, - 0x53, 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x4f, - 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, - 0x44, 0x10, 0x13, 0x12, 0x2b, 0x0a, 0x27, 0x4c, 0x45, 0x41, 0x53, 0x45, 0x5f, 0x48, 0x54, 0x4c, - 0x43, 0x5f, 0x4f, 0x46, 0x46, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, - 0x54, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x10, 0x14, - 0x12, 0x2c, 0x0a, 0x28, 0x4c, 0x45, 0x41, 0x53, 0x45, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, - 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, - 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x10, 0x15, 0x12, 0x19, - 0x0a, 0x15, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x50, 0x55, 0x42, 0x5f, 0x4b, 0x45, - 0x59, 0x5f, 0x53, 0x50, 0x45, 0x4e, 0x44, 0x10, 0x16, 0x12, 0x1e, 0x0a, 0x1a, 0x54, 0x41, 0x50, - 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, - 0x54, 0x5f, 0x53, 0x50, 0x45, 0x4e, 0x44, 0x10, 0x17, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x41, 0x50, - 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, - 0x49, 0x54, 0x5f, 0x53, 0x50, 0x45, 0x4e, 0x44, 0x10, 0x18, 0x12, 0x1e, 0x0a, 0x1a, 0x54, 0x41, - 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x41, 0x4e, 0x43, 0x48, 0x4f, 0x52, 0x5f, 0x53, 0x57, 0x45, - 0x45, 0x50, 0x5f, 0x53, 0x50, 0x45, 0x4e, 0x44, 0x10, 0x19, 0x12, 0x2d, 0x0a, 0x29, 0x54, 0x41, - 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x4f, 0x46, 0x46, 0x45, 0x52, - 0x45, 0x44, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, - 0x44, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x10, 0x1a, 0x12, 0x2e, 0x0a, 0x2a, 0x54, 0x41, 0x50, - 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, - 0x45, 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, - 0x44, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x10, 0x1b, 0x12, 0x24, 0x0a, 0x20, 0x54, 0x41, 0x50, - 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, - 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x52, 0x45, 0x56, 0x4f, 0x4b, 0x45, 0x10, 0x1c, 0x12, - 0x20, 0x0a, 0x1c, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, - 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x56, 0x4f, 0x4b, 0x45, 0x10, - 0x1d, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x48, 0x54, 0x4c, - 0x43, 0x5f, 0x4f, 0x46, 0x46, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x56, 0x4f, 0x4b, 0x45, - 0x10, 0x1e, 0x12, 0x27, 0x0a, 0x23, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x48, 0x54, - 0x4c, 0x43, 0x5f, 0x4f, 0x46, 0x46, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x54, - 0x45, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x1f, 0x12, 0x26, 0x0a, 0x22, 0x54, - 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x4c, 0x4f, 0x43, 0x41, - 0x4c, 0x5f, 0x4f, 0x46, 0x46, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, - 0x54, 0x10, 0x20, 0x12, 0x28, 0x0a, 0x24, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x48, - 0x54, 0x4c, 0x43, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x4d, - 0x4f, 0x54, 0x45, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x21, 0x12, 0x27, 0x0a, - 0x23, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, 0x43, - 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x5f, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x5f, 0x53, 0x55, 0x43, - 0x43, 0x45, 0x53, 0x53, 0x10, 0x22, 0x12, 0x1d, 0x0a, 0x19, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, - 0x54, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x56, - 0x4f, 0x4b, 0x45, 0x10, 0x23, 0x2a, 0x56, 0x0a, 0x11, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x1f, 0x43, 0x48, - 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x1c, 0x0a, 0x18, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, - 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x32, 0x54, 0x52, 0x10, 0x01, 0x32, 0xf6, 0x10, - 0x0a, 0x09, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x4b, 0x69, 0x74, 0x12, 0x4c, 0x0a, 0x0b, 0x4c, - 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x2e, 0x77, 0x61, 0x6c, - 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, - 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x77, 0x61, 0x6c, 0x6c, + 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x49, 0x4e, 0x50, 0x55, 0x54, 0x5f, 0x43, 0x4f, 0x4e, + 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x10, 0x11, 0x12, 0x1e, 0x0a, 0x1a, 0x4c, 0x45, 0x41, 0x53, + 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x49, 0x4d, + 0x45, 0x5f, 0x4c, 0x4f, 0x43, 0x4b, 0x10, 0x12, 0x12, 0x28, 0x0a, 0x24, 0x4c, 0x45, 0x41, 0x53, + 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x4f, 0x5f, + 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, + 0x10, 0x13, 0x12, 0x2b, 0x0a, 0x27, 0x4c, 0x45, 0x41, 0x53, 0x45, 0x5f, 0x48, 0x54, 0x4c, 0x43, + 0x5f, 0x4f, 0x46, 0x46, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, + 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x10, 0x14, 0x12, + 0x2c, 0x0a, 0x28, 0x4c, 0x45, 0x41, 0x53, 0x45, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, 0x43, + 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x53, + 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x10, 0x15, 0x12, 0x19, 0x0a, + 0x15, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x50, 0x55, 0x42, 0x5f, 0x4b, 0x45, 0x59, + 0x5f, 0x53, 0x50, 0x45, 0x4e, 0x44, 0x10, 0x16, 0x12, 0x1e, 0x0a, 0x1a, 0x54, 0x41, 0x50, 0x52, + 0x4f, 0x4f, 0x54, 0x5f, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, + 0x5f, 0x53, 0x50, 0x45, 0x4e, 0x44, 0x10, 0x17, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x41, 0x50, 0x52, + 0x4f, 0x4f, 0x54, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, + 0x54, 0x5f, 0x53, 0x50, 0x45, 0x4e, 0x44, 0x10, 0x18, 0x12, 0x1e, 0x0a, 0x1a, 0x54, 0x41, 0x50, + 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x41, 0x4e, 0x43, 0x48, 0x4f, 0x52, 0x5f, 0x53, 0x57, 0x45, 0x45, + 0x50, 0x5f, 0x53, 0x50, 0x45, 0x4e, 0x44, 0x10, 0x19, 0x12, 0x2d, 0x0a, 0x29, 0x54, 0x41, 0x50, + 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x4f, 0x46, 0x46, 0x45, 0x52, 0x45, + 0x44, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, + 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x10, 0x1a, 0x12, 0x2e, 0x0a, 0x2a, 0x54, 0x41, 0x50, 0x52, + 0x4f, 0x4f, 0x54, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, + 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, + 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x10, 0x1b, 0x12, 0x24, 0x0a, 0x20, 0x54, 0x41, 0x50, 0x52, + 0x4f, 0x4f, 0x54, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x5f, + 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x52, 0x45, 0x56, 0x4f, 0x4b, 0x45, 0x10, 0x1c, 0x12, 0x20, + 0x0a, 0x1c, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, + 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x56, 0x4f, 0x4b, 0x45, 0x10, 0x1d, + 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x48, 0x54, 0x4c, 0x43, + 0x5f, 0x4f, 0x46, 0x46, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x56, 0x4f, 0x4b, 0x45, 0x10, + 0x1e, 0x12, 0x27, 0x0a, 0x23, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x48, 0x54, 0x4c, + 0x43, 0x5f, 0x4f, 0x46, 0x46, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, + 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x1f, 0x12, 0x26, 0x0a, 0x22, 0x54, 0x41, + 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x4c, 0x4f, 0x43, 0x41, 0x4c, + 0x5f, 0x4f, 0x46, 0x46, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, + 0x10, 0x20, 0x12, 0x28, 0x0a, 0x24, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x48, 0x54, + 0x4c, 0x43, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x4d, 0x4f, + 0x54, 0x45, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x21, 0x12, 0x27, 0x0a, 0x23, + 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, 0x43, 0x43, + 0x45, 0x50, 0x54, 0x45, 0x44, 0x5f, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x5f, 0x53, 0x55, 0x43, 0x43, + 0x45, 0x53, 0x53, 0x10, 0x22, 0x12, 0x1d, 0x0a, 0x19, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, + 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x56, 0x4f, + 0x4b, 0x45, 0x10, 0x23, 0x2a, 0x56, 0x0a, 0x11, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x1f, 0x43, 0x48, 0x41, + 0x4e, 0x47, 0x45, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1c, + 0x0a, 0x18, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x32, 0x54, 0x52, 0x10, 0x01, 0x32, 0xf6, 0x10, 0x0a, + 0x09, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x4b, 0x69, 0x74, 0x12, 0x4c, 0x0a, 0x0b, 0x4c, 0x69, + 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0b, 0x4c, 0x65, 0x61, - 0x73, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1d, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, - 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, + 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0b, 0x4c, 0x65, 0x61, 0x73, + 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1d, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x0d, 0x52, 0x65, 0x6c, 0x65, 0x61, - 0x73, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1f, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, + 0x70, 0x63, 0x2e, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x0d, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, + 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1f, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, + 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x4f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x77, 0x61, 0x6c, 0x6c, - 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x4f, 0x75, 0x74, - 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x4c, - 0x69, 0x73, 0x74, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x77, 0x61, 0x6c, 0x6c, - 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, - 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x0d, 0x44, 0x65, 0x72, 0x69, 0x76, 0x65, - 0x4e, 0x65, 0x78, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x11, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, - 0x72, 0x70, 0x63, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x73, 0x69, 0x67, - 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x6f, 0x72, 0x12, 0x38, 0x0a, 0x09, 0x44, 0x65, 0x72, 0x69, 0x76, 0x65, 0x4b, 0x65, 0x79, 0x12, - 0x13, 0x2e, 0x73, 0x69, 0x67, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4b, 0x65, 0x79, 0x4c, 0x6f, 0x63, - 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x16, 0x2e, 0x73, 0x69, 0x67, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4b, - 0x65, 0x79, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x3b, 0x0a, 0x08, - 0x4e, 0x65, 0x78, 0x74, 0x41, 0x64, 0x64, 0x72, 0x12, 0x16, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, - 0x74, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x17, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x64, 0x64, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0e, 0x47, 0x65, 0x74, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x77, 0x61, - 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, - 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x4f, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x12, 0x1e, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1f, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x58, 0x0a, 0x0f, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x52, 0x65, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x12, 0x21, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, - 0x63, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, - 0x74, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x0d, - 0x4c, 0x69, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x1f, 0x2e, + 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x4c, 0x69, + 0x73, 0x74, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, + 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, + 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x0d, 0x44, 0x65, 0x72, 0x69, 0x76, 0x65, 0x4e, + 0x65, 0x78, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x11, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, + 0x70, 0x63, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x73, 0x69, 0x67, 0x6e, + 0x72, 0x70, 0x63, 0x2e, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, + 0x72, 0x12, 0x38, 0x0a, 0x09, 0x44, 0x65, 0x72, 0x69, 0x76, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x13, + 0x2e, 0x73, 0x69, 0x67, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4b, 0x65, 0x79, 0x4c, 0x6f, 0x63, 0x61, + 0x74, 0x6f, 0x72, 0x1a, 0x16, 0x2e, 0x73, 0x69, 0x67, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4b, 0x65, + 0x79, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x3b, 0x0a, 0x08, 0x4e, + 0x65, 0x78, 0x74, 0x41, 0x64, 0x64, 0x72, 0x12, 0x16, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, + 0x72, 0x70, 0x63, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x17, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x64, 0x64, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x77, 0x61, 0x6c, + 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6c, + 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x4f, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, + 0x12, 0x1e, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1f, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x58, 0x0a, 0x0f, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x12, 0x21, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, + 0x2e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, + 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x0d, 0x4c, + 0x69, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x77, + 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, - 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x64, 0x0a, 0x13, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x57, - 0x69, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x12, 0x25, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, - 0x72, 0x70, 0x63, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x57, - 0x69, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, - 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x15, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x12, - 0x27, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x56, 0x65, 0x72, 0x69, - 0x66, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x41, 0x64, 0x64, - 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, - 0x74, 0x72, 0x70, 0x63, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x52, 0x0a, 0x0d, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x1f, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, - 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, - 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x0f, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, - 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x21, 0x2e, 0x77, 0x61, 0x6c, 0x6c, - 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x77, - 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x50, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x58, 0x0a, 0x0f, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x70, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x12, 0x21, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, - 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x70, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, - 0x70, 0x63, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x70, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x12, 0x50, 0x75, - 0x62, 0x6c, 0x69, 0x73, 0x68, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x16, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x1a, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, - 0x74, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x11, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x77, 0x61, 0x6c, 0x6c, - 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x77, 0x61, - 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x4c, 0x0a, 0x0b, 0x53, 0x65, 0x6e, 0x64, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, - 0x12, 0x1d, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x6e, - 0x64, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1e, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x6e, 0x64, - 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x4c, 0x0a, 0x0b, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x12, 0x1d, - 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, - 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x64, 0x0a, 0x13, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, + 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x12, 0x25, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, + 0x70, 0x63, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, + 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, + 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x15, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x12, 0x27, + 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, + 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, + 0x72, 0x70, 0x63, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x57, 0x69, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x52, 0x0a, 0x0d, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x1f, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x49, + 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, + 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x0f, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x50, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x21, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, + 0x74, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x77, 0x61, + 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x58, 0x0a, 0x0f, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x70, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x12, 0x21, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x49, + 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x70, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, + 0x63, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x70, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x12, 0x50, 0x75, 0x62, + 0x6c, 0x69, 0x73, 0x68, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x16, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x1a, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, + 0x72, 0x70, 0x63, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x11, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, + 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x77, 0x61, 0x6c, + 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x4c, 0x0a, 0x0b, 0x53, 0x65, 0x6e, 0x64, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x12, + 0x1d, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x6e, 0x64, + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, + 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, + 0x0a, 0x0b, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x12, 0x1d, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, - 0x74, 0x65, 0x46, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, - 0x0d, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x77, 0x65, 0x65, 0x70, 0x73, 0x12, 0x1f, + 0x74, 0x65, 0x46, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x77, + 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, + 0x65, 0x46, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x0d, + 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x77, 0x65, 0x65, 0x70, 0x73, 0x12, 0x1f, 0x2e, + 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x53, 0x77, 0x65, 0x65, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x53, 0x77, 0x65, 0x65, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x20, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x65, 0x6e, 0x64, - 0x69, 0x6e, 0x67, 0x53, 0x77, 0x65, 0x65, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x40, 0x0a, 0x07, 0x42, 0x75, 0x6d, 0x70, 0x46, 0x65, 0x65, 0x12, 0x19, 0x2e, 0x77, - 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x75, 0x6d, 0x70, 0x46, 0x65, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, - 0x72, 0x70, 0x63, 0x2e, 0x42, 0x75, 0x6d, 0x70, 0x46, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x65, 0x65, 0x70, - 0x73, 0x12, 0x1c, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x53, 0x77, 0x65, 0x65, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1d, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x53, 0x77, 0x65, 0x65, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, - 0x0a, 0x10, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, - 0x61, 0x62, 0x65, 0x6c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, - 0x70, 0x63, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x08, 0x46, - 0x75, 0x6e, 0x64, 0x50, 0x73, 0x62, 0x74, 0x12, 0x1a, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, - 0x72, 0x70, 0x63, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x50, 0x73, 0x62, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, - 0x46, 0x75, 0x6e, 0x64, 0x50, 0x73, 0x62, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x43, 0x0a, 0x08, 0x53, 0x69, 0x67, 0x6e, 0x50, 0x73, 0x62, 0x74, 0x12, 0x1a, 0x2e, 0x77, - 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x50, 0x73, 0x62, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, - 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x50, 0x73, 0x62, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x0c, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, - 0x65, 0x50, 0x73, 0x62, 0x74, 0x12, 0x1e, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, - 0x63, 0x2e, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x50, 0x73, 0x62, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, - 0x63, 0x2e, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x50, 0x73, 0x62, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6e, 0x65, - 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x6c, 0x6e, 0x64, 0x2f, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2f, - 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x6e, 0x67, 0x53, 0x77, 0x65, 0x65, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x40, 0x0a, 0x07, 0x42, 0x75, 0x6d, 0x70, 0x46, 0x65, 0x65, 0x12, 0x19, 0x2e, 0x77, 0x61, + 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x75, 0x6d, 0x70, 0x46, 0x65, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, + 0x70, 0x63, 0x2e, 0x42, 0x75, 0x6d, 0x70, 0x46, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x65, 0x65, 0x70, 0x73, + 0x12, 0x1c, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x53, 0x77, 0x65, 0x65, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, + 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, + 0x77, 0x65, 0x65, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, + 0x10, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x22, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x61, + 0x62, 0x65, 0x6c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, + 0x63, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x08, 0x46, 0x75, + 0x6e, 0x64, 0x50, 0x73, 0x62, 0x74, 0x12, 0x1a, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, + 0x70, 0x63, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x50, 0x73, 0x62, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x46, + 0x75, 0x6e, 0x64, 0x50, 0x73, 0x62, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x43, 0x0a, 0x08, 0x53, 0x69, 0x67, 0x6e, 0x50, 0x73, 0x62, 0x74, 0x12, 0x1a, 0x2e, 0x77, 0x61, + 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x50, 0x73, 0x62, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, + 0x72, 0x70, 0x63, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x50, 0x73, 0x62, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x0c, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, + 0x50, 0x73, 0x62, 0x74, 0x12, 0x1e, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, + 0x2e, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x50, 0x73, 0x62, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, + 0x2e, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x50, 0x73, 0x62, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x6c, 0x6e, 0x64, 0x2f, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2f, 0x77, + 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -4793,7 +4940,7 @@ func file_walletrpc_walletkit_proto_rawDescGZIP() []byte { } var file_walletrpc_walletkit_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_walletrpc_walletkit_proto_msgTypes = make([]protoimpl.MessageInfo, 60) +var file_walletrpc_walletkit_proto_msgTypes = make([]protoimpl.MessageInfo, 61) var file_walletrpc_walletkit_proto_goTypes = []interface{}{ (AddressType)(0), // 0: walletrpc.AddressType (WitnessType)(0), // 1: walletrpc.WitnessType @@ -4849,27 +4996,28 @@ var file_walletrpc_walletkit_proto_goTypes = []interface{}{ (*FundPsbtRequest)(nil), // 51: walletrpc.FundPsbtRequest (*FundPsbtResponse)(nil), // 52: walletrpc.FundPsbtResponse (*TxTemplate)(nil), // 53: walletrpc.TxTemplate - (*UtxoLease)(nil), // 54: walletrpc.UtxoLease - (*SignPsbtRequest)(nil), // 55: walletrpc.SignPsbtRequest - (*SignPsbtResponse)(nil), // 56: walletrpc.SignPsbtResponse - (*FinalizePsbtRequest)(nil), // 57: walletrpc.FinalizePsbtRequest - (*FinalizePsbtResponse)(nil), // 58: walletrpc.FinalizePsbtResponse - (*ListLeasesRequest)(nil), // 59: walletrpc.ListLeasesRequest - (*ListLeasesResponse)(nil), // 60: walletrpc.ListLeasesResponse - (*ListSweepsResponse_TransactionIDs)(nil), // 61: walletrpc.ListSweepsResponse.TransactionIDs - nil, // 62: walletrpc.TxTemplate.OutputsEntry - (*lnrpc.Utxo)(nil), // 63: lnrpc.Utxo - (*lnrpc.OutPoint)(nil), // 64: lnrpc.OutPoint - (*signrpc.TxOut)(nil), // 65: signrpc.TxOut - (*lnrpc.TransactionDetails)(nil), // 66: lnrpc.TransactionDetails - (*signrpc.KeyLocator)(nil), // 67: signrpc.KeyLocator - (*signrpc.KeyDescriptor)(nil), // 68: signrpc.KeyDescriptor - (*lnrpc.Transaction)(nil), // 69: lnrpc.Transaction + (*PsbtCoinSelect)(nil), // 54: walletrpc.PsbtCoinSelect + (*UtxoLease)(nil), // 55: walletrpc.UtxoLease + (*SignPsbtRequest)(nil), // 56: walletrpc.SignPsbtRequest + (*SignPsbtResponse)(nil), // 57: walletrpc.SignPsbtResponse + (*FinalizePsbtRequest)(nil), // 58: walletrpc.FinalizePsbtRequest + (*FinalizePsbtResponse)(nil), // 59: walletrpc.FinalizePsbtResponse + (*ListLeasesRequest)(nil), // 60: walletrpc.ListLeasesRequest + (*ListLeasesResponse)(nil), // 61: walletrpc.ListLeasesResponse + (*ListSweepsResponse_TransactionIDs)(nil), // 62: walletrpc.ListSweepsResponse.TransactionIDs + nil, // 63: walletrpc.TxTemplate.OutputsEntry + (*lnrpc.Utxo)(nil), // 64: lnrpc.Utxo + (*lnrpc.OutPoint)(nil), // 65: lnrpc.OutPoint + (*signrpc.TxOut)(nil), // 66: signrpc.TxOut + (*lnrpc.TransactionDetails)(nil), // 67: lnrpc.TransactionDetails + (*signrpc.KeyLocator)(nil), // 68: signrpc.KeyLocator + (*signrpc.KeyDescriptor)(nil), // 69: signrpc.KeyDescriptor + (*lnrpc.Transaction)(nil), // 70: lnrpc.Transaction } var file_walletrpc_walletkit_proto_depIdxs = []int32{ - 63, // 0: walletrpc.ListUnspentResponse.utxos:type_name -> lnrpc.Utxo - 64, // 1: walletrpc.LeaseOutputRequest.outpoint:type_name -> lnrpc.OutPoint - 64, // 2: walletrpc.ReleaseOutputRequest.outpoint:type_name -> lnrpc.OutPoint + 64, // 0: walletrpc.ListUnspentResponse.utxos:type_name -> lnrpc.Utxo + 65, // 1: walletrpc.LeaseOutputRequest.outpoint:type_name -> lnrpc.OutPoint + 65, // 2: walletrpc.ReleaseOutputRequest.outpoint:type_name -> lnrpc.OutPoint 0, // 3: walletrpc.AddrRequest.type:type_name -> walletrpc.AddressType 0, // 4: walletrpc.Account.address_type:type_name -> walletrpc.AddressType 0, // 5: walletrpc.AccountWithAddresses.address_type:type_name -> walletrpc.AddressType @@ -4884,79 +5032,80 @@ var file_walletrpc_walletkit_proto_depIdxs = []int32{ 33, // 14: walletrpc.ImportTapscriptRequest.partial_reveal:type_name -> walletrpc.TapscriptPartialReveal 32, // 15: walletrpc.TapscriptFullTree.all_leaves:type_name -> walletrpc.TapLeaf 32, // 16: walletrpc.TapscriptPartialReveal.revealed_leaf:type_name -> walletrpc.TapLeaf - 65, // 17: walletrpc.SendOutputsRequest.outputs:type_name -> signrpc.TxOut - 64, // 18: walletrpc.PendingSweep.outpoint:type_name -> lnrpc.OutPoint + 66, // 17: walletrpc.SendOutputsRequest.outputs:type_name -> signrpc.TxOut + 65, // 18: walletrpc.PendingSweep.outpoint:type_name -> lnrpc.OutPoint 1, // 19: walletrpc.PendingSweep.witness_type:type_name -> walletrpc.WitnessType 42, // 20: walletrpc.PendingSweepsResponse.pending_sweeps:type_name -> walletrpc.PendingSweep - 64, // 21: walletrpc.BumpFeeRequest.outpoint:type_name -> lnrpc.OutPoint - 66, // 22: walletrpc.ListSweepsResponse.transaction_details:type_name -> lnrpc.TransactionDetails - 61, // 23: walletrpc.ListSweepsResponse.transaction_ids:type_name -> walletrpc.ListSweepsResponse.TransactionIDs + 65, // 21: walletrpc.BumpFeeRequest.outpoint:type_name -> lnrpc.OutPoint + 67, // 22: walletrpc.ListSweepsResponse.transaction_details:type_name -> lnrpc.TransactionDetails + 62, // 23: walletrpc.ListSweepsResponse.transaction_ids:type_name -> walletrpc.ListSweepsResponse.TransactionIDs 53, // 24: walletrpc.FundPsbtRequest.raw:type_name -> walletrpc.TxTemplate - 2, // 25: walletrpc.FundPsbtRequest.change_type:type_name -> walletrpc.ChangeAddressType - 54, // 26: walletrpc.FundPsbtResponse.locked_utxos:type_name -> walletrpc.UtxoLease - 64, // 27: walletrpc.TxTemplate.inputs:type_name -> lnrpc.OutPoint - 62, // 28: walletrpc.TxTemplate.outputs:type_name -> walletrpc.TxTemplate.OutputsEntry - 64, // 29: walletrpc.UtxoLease.outpoint:type_name -> lnrpc.OutPoint - 54, // 30: walletrpc.ListLeasesResponse.locked_utxos:type_name -> walletrpc.UtxoLease - 3, // 31: walletrpc.WalletKit.ListUnspent:input_type -> walletrpc.ListUnspentRequest - 5, // 32: walletrpc.WalletKit.LeaseOutput:input_type -> walletrpc.LeaseOutputRequest - 7, // 33: walletrpc.WalletKit.ReleaseOutput:input_type -> walletrpc.ReleaseOutputRequest - 59, // 34: walletrpc.WalletKit.ListLeases:input_type -> walletrpc.ListLeasesRequest - 9, // 35: walletrpc.WalletKit.DeriveNextKey:input_type -> walletrpc.KeyReq - 67, // 36: walletrpc.WalletKit.DeriveKey:input_type -> signrpc.KeyLocator - 10, // 37: walletrpc.WalletKit.NextAddr:input_type -> walletrpc.AddrRequest - 21, // 38: walletrpc.WalletKit.GetTransaction:input_type -> walletrpc.GetTransactionRequest - 15, // 39: walletrpc.WalletKit.ListAccounts:input_type -> walletrpc.ListAccountsRequest - 17, // 40: walletrpc.WalletKit.RequiredReserve:input_type -> walletrpc.RequiredReserveRequest - 19, // 41: walletrpc.WalletKit.ListAddresses:input_type -> walletrpc.ListAddressesRequest - 22, // 42: walletrpc.WalletKit.SignMessageWithAddr:input_type -> walletrpc.SignMessageWithAddrRequest - 24, // 43: walletrpc.WalletKit.VerifyMessageWithAddr:input_type -> walletrpc.VerifyMessageWithAddrRequest - 26, // 44: walletrpc.WalletKit.ImportAccount:input_type -> walletrpc.ImportAccountRequest - 28, // 45: walletrpc.WalletKit.ImportPublicKey:input_type -> walletrpc.ImportPublicKeyRequest - 30, // 46: walletrpc.WalletKit.ImportTapscript:input_type -> walletrpc.ImportTapscriptRequest - 35, // 47: walletrpc.WalletKit.PublishTransaction:input_type -> walletrpc.Transaction - 21, // 48: walletrpc.WalletKit.RemoveTransaction:input_type -> walletrpc.GetTransactionRequest - 38, // 49: walletrpc.WalletKit.SendOutputs:input_type -> walletrpc.SendOutputsRequest - 40, // 50: walletrpc.WalletKit.EstimateFee:input_type -> walletrpc.EstimateFeeRequest - 43, // 51: walletrpc.WalletKit.PendingSweeps:input_type -> walletrpc.PendingSweepsRequest - 45, // 52: walletrpc.WalletKit.BumpFee:input_type -> walletrpc.BumpFeeRequest - 47, // 53: walletrpc.WalletKit.ListSweeps:input_type -> walletrpc.ListSweepsRequest - 49, // 54: walletrpc.WalletKit.LabelTransaction:input_type -> walletrpc.LabelTransactionRequest - 51, // 55: walletrpc.WalletKit.FundPsbt:input_type -> walletrpc.FundPsbtRequest - 55, // 56: walletrpc.WalletKit.SignPsbt:input_type -> walletrpc.SignPsbtRequest - 57, // 57: walletrpc.WalletKit.FinalizePsbt:input_type -> walletrpc.FinalizePsbtRequest - 4, // 58: walletrpc.WalletKit.ListUnspent:output_type -> walletrpc.ListUnspentResponse - 6, // 59: walletrpc.WalletKit.LeaseOutput:output_type -> walletrpc.LeaseOutputResponse - 8, // 60: walletrpc.WalletKit.ReleaseOutput:output_type -> walletrpc.ReleaseOutputResponse - 60, // 61: walletrpc.WalletKit.ListLeases:output_type -> walletrpc.ListLeasesResponse - 68, // 62: walletrpc.WalletKit.DeriveNextKey:output_type -> signrpc.KeyDescriptor - 68, // 63: walletrpc.WalletKit.DeriveKey:output_type -> signrpc.KeyDescriptor - 11, // 64: walletrpc.WalletKit.NextAddr:output_type -> walletrpc.AddrResponse - 69, // 65: walletrpc.WalletKit.GetTransaction:output_type -> lnrpc.Transaction - 16, // 66: walletrpc.WalletKit.ListAccounts:output_type -> walletrpc.ListAccountsResponse - 18, // 67: walletrpc.WalletKit.RequiredReserve:output_type -> walletrpc.RequiredReserveResponse - 20, // 68: walletrpc.WalletKit.ListAddresses:output_type -> walletrpc.ListAddressesResponse - 23, // 69: walletrpc.WalletKit.SignMessageWithAddr:output_type -> walletrpc.SignMessageWithAddrResponse - 25, // 70: walletrpc.WalletKit.VerifyMessageWithAddr:output_type -> walletrpc.VerifyMessageWithAddrResponse - 27, // 71: walletrpc.WalletKit.ImportAccount:output_type -> walletrpc.ImportAccountResponse - 29, // 72: walletrpc.WalletKit.ImportPublicKey:output_type -> walletrpc.ImportPublicKeyResponse - 34, // 73: walletrpc.WalletKit.ImportTapscript:output_type -> walletrpc.ImportTapscriptResponse - 36, // 74: walletrpc.WalletKit.PublishTransaction:output_type -> walletrpc.PublishResponse - 37, // 75: walletrpc.WalletKit.RemoveTransaction:output_type -> walletrpc.RemoveTransactionResponse - 39, // 76: walletrpc.WalletKit.SendOutputs:output_type -> walletrpc.SendOutputsResponse - 41, // 77: walletrpc.WalletKit.EstimateFee:output_type -> walletrpc.EstimateFeeResponse - 44, // 78: walletrpc.WalletKit.PendingSweeps:output_type -> walletrpc.PendingSweepsResponse - 46, // 79: walletrpc.WalletKit.BumpFee:output_type -> walletrpc.BumpFeeResponse - 48, // 80: walletrpc.WalletKit.ListSweeps:output_type -> walletrpc.ListSweepsResponse - 50, // 81: walletrpc.WalletKit.LabelTransaction:output_type -> walletrpc.LabelTransactionResponse - 52, // 82: walletrpc.WalletKit.FundPsbt:output_type -> walletrpc.FundPsbtResponse - 56, // 83: walletrpc.WalletKit.SignPsbt:output_type -> walletrpc.SignPsbtResponse - 58, // 84: walletrpc.WalletKit.FinalizePsbt:output_type -> walletrpc.FinalizePsbtResponse - 58, // [58:85] is the sub-list for method output_type - 31, // [31:58] is the sub-list for method input_type - 31, // [31:31] is the sub-list for extension type_name - 31, // [31:31] is the sub-list for extension extendee - 0, // [0:31] is the sub-list for field type_name + 54, // 25: walletrpc.FundPsbtRequest.coin_select:type_name -> walletrpc.PsbtCoinSelect + 2, // 26: walletrpc.FundPsbtRequest.change_type:type_name -> walletrpc.ChangeAddressType + 55, // 27: walletrpc.FundPsbtResponse.locked_utxos:type_name -> walletrpc.UtxoLease + 65, // 28: walletrpc.TxTemplate.inputs:type_name -> lnrpc.OutPoint + 63, // 29: walletrpc.TxTemplate.outputs:type_name -> walletrpc.TxTemplate.OutputsEntry + 65, // 30: walletrpc.UtxoLease.outpoint:type_name -> lnrpc.OutPoint + 55, // 31: walletrpc.ListLeasesResponse.locked_utxos:type_name -> walletrpc.UtxoLease + 3, // 32: walletrpc.WalletKit.ListUnspent:input_type -> walletrpc.ListUnspentRequest + 5, // 33: walletrpc.WalletKit.LeaseOutput:input_type -> walletrpc.LeaseOutputRequest + 7, // 34: walletrpc.WalletKit.ReleaseOutput:input_type -> walletrpc.ReleaseOutputRequest + 60, // 35: walletrpc.WalletKit.ListLeases:input_type -> walletrpc.ListLeasesRequest + 9, // 36: walletrpc.WalletKit.DeriveNextKey:input_type -> walletrpc.KeyReq + 68, // 37: walletrpc.WalletKit.DeriveKey:input_type -> signrpc.KeyLocator + 10, // 38: walletrpc.WalletKit.NextAddr:input_type -> walletrpc.AddrRequest + 21, // 39: walletrpc.WalletKit.GetTransaction:input_type -> walletrpc.GetTransactionRequest + 15, // 40: walletrpc.WalletKit.ListAccounts:input_type -> walletrpc.ListAccountsRequest + 17, // 41: walletrpc.WalletKit.RequiredReserve:input_type -> walletrpc.RequiredReserveRequest + 19, // 42: walletrpc.WalletKit.ListAddresses:input_type -> walletrpc.ListAddressesRequest + 22, // 43: walletrpc.WalletKit.SignMessageWithAddr:input_type -> walletrpc.SignMessageWithAddrRequest + 24, // 44: walletrpc.WalletKit.VerifyMessageWithAddr:input_type -> walletrpc.VerifyMessageWithAddrRequest + 26, // 45: walletrpc.WalletKit.ImportAccount:input_type -> walletrpc.ImportAccountRequest + 28, // 46: walletrpc.WalletKit.ImportPublicKey:input_type -> walletrpc.ImportPublicKeyRequest + 30, // 47: walletrpc.WalletKit.ImportTapscript:input_type -> walletrpc.ImportTapscriptRequest + 35, // 48: walletrpc.WalletKit.PublishTransaction:input_type -> walletrpc.Transaction + 21, // 49: walletrpc.WalletKit.RemoveTransaction:input_type -> walletrpc.GetTransactionRequest + 38, // 50: walletrpc.WalletKit.SendOutputs:input_type -> walletrpc.SendOutputsRequest + 40, // 51: walletrpc.WalletKit.EstimateFee:input_type -> walletrpc.EstimateFeeRequest + 43, // 52: walletrpc.WalletKit.PendingSweeps:input_type -> walletrpc.PendingSweepsRequest + 45, // 53: walletrpc.WalletKit.BumpFee:input_type -> walletrpc.BumpFeeRequest + 47, // 54: walletrpc.WalletKit.ListSweeps:input_type -> walletrpc.ListSweepsRequest + 49, // 55: walletrpc.WalletKit.LabelTransaction:input_type -> walletrpc.LabelTransactionRequest + 51, // 56: walletrpc.WalletKit.FundPsbt:input_type -> walletrpc.FundPsbtRequest + 56, // 57: walletrpc.WalletKit.SignPsbt:input_type -> walletrpc.SignPsbtRequest + 58, // 58: walletrpc.WalletKit.FinalizePsbt:input_type -> walletrpc.FinalizePsbtRequest + 4, // 59: walletrpc.WalletKit.ListUnspent:output_type -> walletrpc.ListUnspentResponse + 6, // 60: walletrpc.WalletKit.LeaseOutput:output_type -> walletrpc.LeaseOutputResponse + 8, // 61: walletrpc.WalletKit.ReleaseOutput:output_type -> walletrpc.ReleaseOutputResponse + 61, // 62: walletrpc.WalletKit.ListLeases:output_type -> walletrpc.ListLeasesResponse + 69, // 63: walletrpc.WalletKit.DeriveNextKey:output_type -> signrpc.KeyDescriptor + 69, // 64: walletrpc.WalletKit.DeriveKey:output_type -> signrpc.KeyDescriptor + 11, // 65: walletrpc.WalletKit.NextAddr:output_type -> walletrpc.AddrResponse + 70, // 66: walletrpc.WalletKit.GetTransaction:output_type -> lnrpc.Transaction + 16, // 67: walletrpc.WalletKit.ListAccounts:output_type -> walletrpc.ListAccountsResponse + 18, // 68: walletrpc.WalletKit.RequiredReserve:output_type -> walletrpc.RequiredReserveResponse + 20, // 69: walletrpc.WalletKit.ListAddresses:output_type -> walletrpc.ListAddressesResponse + 23, // 70: walletrpc.WalletKit.SignMessageWithAddr:output_type -> walletrpc.SignMessageWithAddrResponse + 25, // 71: walletrpc.WalletKit.VerifyMessageWithAddr:output_type -> walletrpc.VerifyMessageWithAddrResponse + 27, // 72: walletrpc.WalletKit.ImportAccount:output_type -> walletrpc.ImportAccountResponse + 29, // 73: walletrpc.WalletKit.ImportPublicKey:output_type -> walletrpc.ImportPublicKeyResponse + 34, // 74: walletrpc.WalletKit.ImportTapscript:output_type -> walletrpc.ImportTapscriptResponse + 36, // 75: walletrpc.WalletKit.PublishTransaction:output_type -> walletrpc.PublishResponse + 37, // 76: walletrpc.WalletKit.RemoveTransaction:output_type -> walletrpc.RemoveTransactionResponse + 39, // 77: walletrpc.WalletKit.SendOutputs:output_type -> walletrpc.SendOutputsResponse + 41, // 78: walletrpc.WalletKit.EstimateFee:output_type -> walletrpc.EstimateFeeResponse + 44, // 79: walletrpc.WalletKit.PendingSweeps:output_type -> walletrpc.PendingSweepsResponse + 46, // 80: walletrpc.WalletKit.BumpFee:output_type -> walletrpc.BumpFeeResponse + 48, // 81: walletrpc.WalletKit.ListSweeps:output_type -> walletrpc.ListSweepsResponse + 50, // 82: walletrpc.WalletKit.LabelTransaction:output_type -> walletrpc.LabelTransactionResponse + 52, // 83: walletrpc.WalletKit.FundPsbt:output_type -> walletrpc.FundPsbtResponse + 57, // 84: walletrpc.WalletKit.SignPsbt:output_type -> walletrpc.SignPsbtResponse + 59, // 85: walletrpc.WalletKit.FinalizePsbt:output_type -> walletrpc.FinalizePsbtResponse + 59, // [59:86] is the sub-list for method output_type + 32, // [32:59] is the sub-list for method input_type + 32, // [32:32] is the sub-list for extension type_name + 32, // [32:32] is the sub-list for extension extendee + 0, // [0:32] is the sub-list for field type_name } func init() { file_walletrpc_walletkit_proto_init() } @@ -5578,7 +5727,7 @@ func file_walletrpc_walletkit_proto_init() { } } file_walletrpc_walletkit_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UtxoLease); i { + switch v := v.(*PsbtCoinSelect); i { case 0: return &v.state case 1: @@ -5590,7 +5739,7 @@ func file_walletrpc_walletkit_proto_init() { } } file_walletrpc_walletkit_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SignPsbtRequest); i { + switch v := v.(*UtxoLease); i { case 0: return &v.state case 1: @@ -5602,7 +5751,7 @@ func file_walletrpc_walletkit_proto_init() { } } file_walletrpc_walletkit_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SignPsbtResponse); i { + switch v := v.(*SignPsbtRequest); i { case 0: return &v.state case 1: @@ -5614,7 +5763,7 @@ func file_walletrpc_walletkit_proto_init() { } } file_walletrpc_walletkit_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FinalizePsbtRequest); i { + switch v := v.(*SignPsbtResponse); i { case 0: return &v.state case 1: @@ -5626,7 +5775,7 @@ func file_walletrpc_walletkit_proto_init() { } } file_walletrpc_walletkit_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FinalizePsbtResponse); i { + switch v := v.(*FinalizePsbtRequest); i { case 0: return &v.state case 1: @@ -5638,7 +5787,7 @@ func file_walletrpc_walletkit_proto_init() { } } file_walletrpc_walletkit_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListLeasesRequest); i { + switch v := v.(*FinalizePsbtResponse); i { case 0: return &v.state case 1: @@ -5650,7 +5799,7 @@ func file_walletrpc_walletkit_proto_init() { } } file_walletrpc_walletkit_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListLeasesResponse); i { + switch v := v.(*ListLeasesRequest); i { case 0: return &v.state case 1: @@ -5662,6 +5811,18 @@ func file_walletrpc_walletkit_proto_init() { } } file_walletrpc_walletkit_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListLeasesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_walletrpc_walletkit_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListSweepsResponse_TransactionIDs); i { case 0: return &v.state @@ -5687,16 +5848,21 @@ func file_walletrpc_walletkit_proto_init() { file_walletrpc_walletkit_proto_msgTypes[48].OneofWrappers = []interface{}{ (*FundPsbtRequest_Psbt)(nil), (*FundPsbtRequest_Raw)(nil), + (*FundPsbtRequest_CoinSelect)(nil), (*FundPsbtRequest_TargetConf)(nil), (*FundPsbtRequest_SatPerVbyte)(nil), } + file_walletrpc_walletkit_proto_msgTypes[51].OneofWrappers = []interface{}{ + (*PsbtCoinSelect_ExistingOutputIndex)(nil), + (*PsbtCoinSelect_Add)(nil), + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_walletrpc_walletkit_proto_rawDesc, NumEnums: 3, - NumMessages: 60, + NumMessages: 61, NumExtensions: 0, NumServices: 1, }, diff --git a/lnrpc/walletrpc/walletkit.proto b/lnrpc/walletrpc/walletkit.proto index 7528fd5bd1..b029f3afb5 100644 --- a/lnrpc/walletrpc/walletkit.proto +++ b/lnrpc/walletrpc/walletkit.proto @@ -288,15 +288,25 @@ service WalletKit { /* lncli: `wallet psbt fund` FundPsbt creates a fully populated PSBT that contains enough inputs to fund - the outputs specified in the template. There are two ways of specifying a - template: Either by passing in a PSBT with at least one output declared or - by passing in a raw TxTemplate message. - - If there are no inputs specified in the template, coin selection is - performed automatically. If the template does contain any inputs, it is - assumed that full coin selection happened externally and no additional - inputs are added. If the specified inputs aren't enough to fund the outputs - with the given fee rate, an error is returned. + the outputs specified in the template. There are three ways a user can + specify what we call the template (a list of inputs and outputs to use in + the PSBT): Either as a PSBT packet directly with no coin selection (using + the legacy "psbt" field), a PSBT with advanced coin selection support (using + the new "coin_select" field) or as a raw RPC message (using the "raw" + field). + The legacy "psbt" and "raw" modes, the following restrictions apply: + 1. If there are no inputs specified in the template, coin selection is + performed automatically. + 2. If the template does contain any inputs, it is assumed that full + coin selection happened externally and no additional inputs are added. If + the specified inputs aren't enough to fund the outputs with the given fee + rate, an error is returned. + + The new "coin_select" mode does not have these restrictions and allows the + user to specify a PSBT with inputs and outputs and still perform coin + selection on top of that. + For all modes this RPC requires any inputs that are specified to be locked + by the user (if they belong to this node in the first place). After either selecting or verifying the inputs, all input UTXOs are locked with an internal app ID. @@ -1238,6 +1248,26 @@ message FundPsbtRequest { Use the outputs and optional inputs from this raw template. */ TxTemplate raw = 2; + + /* + Use an existing PSBT packet as the template for the funded PSBT. + + The difference to the pure PSBT template above is that coin selection is + performed even if inputs are specified. The output amounts are summed up + and used as the target amount for coin selection. A change output must + either already exist in the PSBT and be marked as such, otherwise a new + change output of the specified output type will be added. Any inputs + already specified in the PSBT must already be locked (if they belong to + this node), only newly added inputs will be locked by this RPC. + + In case the sum of the already provided inputs exceeds the required + output amount, no new coins are selected. Instead only the fee and + change amount calculation is performed (e.g. a change output is added if + requested or the change is added to the specified existing change + output, given there is any non-dust change). This can be identified by + the returned locked UTXOs being empty. + */ + PsbtCoinSelect coin_select = 9; } oneof fees { @@ -1285,7 +1315,8 @@ message FundPsbtResponse { /* The list of lock leases that were acquired for the inputs in the funded PSBT - packet. + packet. Only inputs added to the PSBT by this RPC are locked, inputs that + were already present in the PSBT are not locked. */ repeated UtxoLease locked_utxos = 3; } @@ -1308,6 +1339,38 @@ message TxTemplate { map outputs = 2; } +message PsbtCoinSelect { + /* + The template to use for the funded PSBT. The template must contain at least + one non-dust output. The amount to be funded is calculated by summing up the + amounts of all outputs in the template, subtracting all the input values of + the already specified inputs. The change value is added to the output that + is marked as such (or a new change output is added if none is marked). For + the input amount calculation to be correct, the template must have the + WitnessUtxo field set for all inputs. Any inputs already specified in the + PSBT must already be locked (if they belong to this node), only newly added + inputs will be locked by this RPC. + */ + bytes psbt = 1; + + oneof change_output { + /* + Use the existing output within the template PSBT with the specified + index as the change output. Any leftover change will be added to the + already specified amount of that output. To add a new change output to + the PSBT, set the "add" field below instead. The type of change output + added is defined by change_type in the parent message. + */ + int32 existing_output_index = 2; + + /* + Add a new change output to the PSBT using the change_type specified in + the parent message. + */ + bool add = 3; + } +} + message UtxoLease { /* A 32 byte random ID that identifies the lease. diff --git a/lnrpc/walletrpc/walletkit.swagger.json b/lnrpc/walletrpc/walletkit.swagger.json index 4c60354556..811c18dc70 100644 --- a/lnrpc/walletrpc/walletkit.swagger.json +++ b/lnrpc/walletrpc/walletkit.swagger.json @@ -440,8 +440,8 @@ }, "/v2/wallet/psbt/fund": { "post": { - "summary": "lncli: `wallet psbt fund`\nFundPsbt creates a fully populated PSBT that contains enough inputs to fund\nthe outputs specified in the template. There are two ways of specifying a\ntemplate: Either by passing in a PSBT with at least one output declared or\nby passing in a raw TxTemplate message.", - "description": "If there are no inputs specified in the template, coin selection is\nperformed automatically. If the template does contain any inputs, it is\nassumed that full coin selection happened externally and no additional\ninputs are added. If the specified inputs aren't enough to fund the outputs\nwith the given fee rate, an error is returned.\n\nAfter either selecting or verifying the inputs, all input UTXOs are locked\nwith an internal app ID.\n\nNOTE: If this method returns without an error, it is the caller's\nresponsibility to either spend the locked UTXOs (by finalizing and then\npublishing the transaction) or to unlock/release the locked UTXOs in case of\nan error on the caller's side.", + "summary": "lncli: `wallet psbt fund`\nFundPsbt creates a fully populated PSBT that contains enough inputs to fund\nthe outputs specified in the template. There are three ways a user can\nspecify what we call the template (a list of inputs and outputs to use in\nthe PSBT): Either as a PSBT packet directly with no coin selection (using\nthe legacy \"psbt\" field), a PSBT with advanced coin selection support (using\nthe new \"coin_select\" field) or as a raw RPC message (using the \"raw\"\nfield).\nThe legacy \"psbt\" and \"raw\" modes, the following restrictions apply:\n1. If there are no inputs specified in the template, coin selection is\nperformed automatically.\n2. If the template does contain any inputs, it is assumed that full\ncoin selection happened externally and no additional inputs are added. If\nthe specified inputs aren't enough to fund the outputs with the given fee\nrate, an error is returned.", + "description": "The new \"coin_select\" mode does not have these restrictions and allows the\nuser to specify a PSBT with inputs and outputs and still perform coin\nselection on top of that.\nFor all modes this RPC requires any inputs that are specified to be locked\nby the user (if they belong to this node in the first place).\n\nAfter either selecting or verifying the inputs, all input UTXOs are locked\nwith an internal app ID.\n\nNOTE: If this method returns without an error, it is the caller's\nresponsibility to either spend the locked UTXOs (by finalizing and then\npublishing the transaction) or to unlock/release the locked UTXOs in case of\nan error on the caller's side.", "operationId": "WalletKit_FundPsbt", "responses": { "200": { @@ -1428,6 +1428,10 @@ "$ref": "#/definitions/walletrpcTxTemplate", "description": "Use the outputs and optional inputs from this raw template." }, + "coin_select": { + "$ref": "#/definitions/walletrpcPsbtCoinSelect", + "description": "Use an existing PSBT packet as the template for the funded PSBT.\n\nThe difference to the pure PSBT template above is that coin selection is\nperformed even if inputs are specified. The output amounts are summed up\nand used as the target amount for coin selection. A change output must\neither already exist in the PSBT and be marked as such, otherwise a new\nchange output of the specified output type will be added. Any inputs\nalready specified in the PSBT must already be locked (if they belong to\nthis node), only newly added inputs will be locked by this RPC.\n\nIn case the sum of the already provided inputs exceeds the required\noutput amount, no new coins are selected. Instead only the fee and\nchange amount calculation is performed (e.g. a change output is added if\nrequested or the change is added to the specified existing change\noutput, given there is any non-dust change). This can be identified by\nthe returned locked UTXOs being empty." + }, "target_conf": { "type": "integer", "format": "int64", @@ -1475,7 +1479,7 @@ "items": { "$ref": "#/definitions/walletrpcUtxoLease" }, - "description": "The list of lock leases that were acquired for the inputs in the funded PSBT\npacket." + "description": "The list of lock leases that were acquired for the inputs in the funded PSBT\npacket. Only inputs added to the PSBT by this RPC are locked, inputs that\nwere already present in the PSBT are not locked." } } }, @@ -1805,6 +1809,25 @@ } } }, + "walletrpcPsbtCoinSelect": { + "type": "object", + "properties": { + "psbt": { + "type": "string", + "format": "byte", + "description": "The template to use for the funded PSBT. The template must contain at least\none non-dust output. The amount to be funded is calculated by summing up the\namounts of all outputs in the template, subtracting all the input values of\nthe already specified inputs. The change value is added to the output that\nis marked as such (or a new change output is added if none is marked). For\nthe input amount calculation to be correct, the template must have the\nWitnessUtxo field set for all inputs. Any inputs already specified in the\nPSBT must already be locked (if they belong to this node), only newly added\ninputs will be locked by this RPC." + }, + "existing_output_index": { + "type": "integer", + "format": "int32", + "description": "Use the existing output within the template PSBT with the specified\nindex as the change output. Any leftover change will be added to the\nalready specified amount of that output. To add a new change output to\nthe PSBT, set the \"add\" field below instead. The type of change output\nadded is defined by change_type in the parent message." + }, + "add": { + "type": "boolean", + "description": "Add a new change output to the PSBT using the change_type specified in\nthe parent message." + } + } + }, "walletrpcPublishResponse": { "type": "object", "properties": { diff --git a/lnrpc/walletrpc/walletkit_grpc.pb.go b/lnrpc/walletrpc/walletkit_grpc.pb.go index 730f37165c..cd59b0f825 100644 --- a/lnrpc/walletrpc/walletkit_grpc.pb.go +++ b/lnrpc/walletrpc/walletkit_grpc.pb.go @@ -218,15 +218,25 @@ type WalletKitClient interface { LabelTransaction(ctx context.Context, in *LabelTransactionRequest, opts ...grpc.CallOption) (*LabelTransactionResponse, error) // lncli: `wallet psbt fund` // FundPsbt creates a fully populated PSBT that contains enough inputs to fund - // the outputs specified in the template. There are two ways of specifying a - // template: Either by passing in a PSBT with at least one output declared or - // by passing in a raw TxTemplate message. + // the outputs specified in the template. There are three ways a user can + // specify what we call the template (a list of inputs and outputs to use in + // the PSBT): Either as a PSBT packet directly with no coin selection (using + // the legacy "psbt" field), a PSBT with advanced coin selection support (using + // the new "coin_select" field) or as a raw RPC message (using the "raw" + // field). + // The legacy "psbt" and "raw" modes, the following restrictions apply: + // 1. If there are no inputs specified in the template, coin selection is + // performed automatically. + // 2. If the template does contain any inputs, it is assumed that full + // coin selection happened externally and no additional inputs are added. If + // the specified inputs aren't enough to fund the outputs with the given fee + // rate, an error is returned. // - // If there are no inputs specified in the template, coin selection is - // performed automatically. If the template does contain any inputs, it is - // assumed that full coin selection happened externally and no additional - // inputs are added. If the specified inputs aren't enough to fund the outputs - // with the given fee rate, an error is returned. + // The new "coin_select" mode does not have these restrictions and allows the + // user to specify a PSBT with inputs and outputs and still perform coin + // selection on top of that. + // For all modes this RPC requires any inputs that are specified to be locked + // by the user (if they belong to this node in the first place). // // After either selecting or verifying the inputs, all input UTXOs are locked // with an internal app ID. @@ -716,15 +726,25 @@ type WalletKitServer interface { LabelTransaction(context.Context, *LabelTransactionRequest) (*LabelTransactionResponse, error) // lncli: `wallet psbt fund` // FundPsbt creates a fully populated PSBT that contains enough inputs to fund - // the outputs specified in the template. There are two ways of specifying a - // template: Either by passing in a PSBT with at least one output declared or - // by passing in a raw TxTemplate message. + // the outputs specified in the template. There are three ways a user can + // specify what we call the template (a list of inputs and outputs to use in + // the PSBT): Either as a PSBT packet directly with no coin selection (using + // the legacy "psbt" field), a PSBT with advanced coin selection support (using + // the new "coin_select" field) or as a raw RPC message (using the "raw" + // field). + // The legacy "psbt" and "raw" modes, the following restrictions apply: + // 1. If there are no inputs specified in the template, coin selection is + // performed automatically. + // 2. If the template does contain any inputs, it is assumed that full + // coin selection happened externally and no additional inputs are added. If + // the specified inputs aren't enough to fund the outputs with the given fee + // rate, an error is returned. // - // If there are no inputs specified in the template, coin selection is - // performed automatically. If the template does contain any inputs, it is - // assumed that full coin selection happened externally and no additional - // inputs are added. If the specified inputs aren't enough to fund the outputs - // with the given fee rate, an error is returned. + // The new "coin_select" mode does not have these restrictions and allows the + // user to specify a PSBT with inputs and outputs and still perform coin + // selection on top of that. + // For all modes this RPC requires any inputs that are specified to be locked + // by the user (if they belong to this node in the first place). // // After either selecting or verifying the inputs, all input UTXOs are locked // with an internal app ID. diff --git a/lnrpc/walletrpc/walletkit_server.go b/lnrpc/walletrpc/walletkit_server.go index 3a1bc40bbc..9a8b9ee5b9 100644 --- a/lnrpc/walletrpc/walletkit_server.go +++ b/lnrpc/walletrpc/walletkit_server.go @@ -1152,13 +1152,24 @@ func (w *WalletKit) LabelTransaction(ctx context.Context, } // FundPsbt creates a fully populated PSBT that contains enough inputs to fund -// the outputs specified in the template. There are two ways of specifying a -// template: Either by passing in a PSBT with at least one output declared or -// by passing in a raw TxTemplate message. If there are no inputs specified in -// the template, coin selection is performed automatically. If the template does -// contain any inputs, it is assumed that full coin selection happened -// externally and no additional inputs are added. If the specified inputs aren't -// enough to fund the outputs with the given fee rate, an error is returned. +// the outputs specified in the template. There are three ways a user can +// specify what we call the template (a list of inputs and outputs to use in the +// PSBT): Either as a PSBT packet directly with no coin selection (using the +// legacy "psbt" field), a PSBT with advanced coin selection support (using the +// new "coin_select" field) or as a raw RPC message (using the "raw" field). +// The legacy "psbt" and "raw" modes, the following restrictions apply: +// 1. If there are no inputs specified in the template, coin selection is +// performed automatically. +// 2. If the template does contain any inputs, it is assumed that full coin +// selection happened externally and no additional inputs are added. If the +// specified inputs aren't enough to fund the outputs with the given fee +// rate, an error is returned. +// +// The new "coin_select" mode does not have these restrictions and allows the +// user to specify a PSBT with inputs and outputs and still perform coin +// selection on top of that. +// For all modes this RPC requires any inputs that are specified to be locked by +// the user (if they belong to this node in the first place). // After either selecting or verifying the inputs, all input UTXOs are locked // with an internal app ID. A custom address type for change can be specified // for default accounts and single imported public keys (only P2TR for now). From 094fdbfa72c7ba8002cb4d0dff16d427cb78221f Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Tue, 6 Feb 2024 12:25:58 +0100 Subject: [PATCH 12/17] walletrpc: implement third PSBT funding option And now we finally implement the new funding option: Allowing coin selection with pre-defined inputs and outputs. --- lnrpc/walletrpc/walletkit_server.go | 375 ++++++++++++++- lnrpc/walletrpc/walletkit_server_test.go | 582 +++++++++++++++++++++++ 2 files changed, 954 insertions(+), 3 deletions(-) diff --git a/lnrpc/walletrpc/walletkit_server.go b/lnrpc/walletrpc/walletkit_server.go index 9a8b9ee5b9..2309e0ebca 100644 --- a/lnrpc/walletrpc/walletkit_server.go +++ b/lnrpc/walletrpc/walletkit_server.go @@ -38,6 +38,7 @@ import ( "github.com/lightningnetwork/lnd/lnwallet" "github.com/lightningnetwork/lnd/lnwallet/btcwallet" "github.com/lightningnetwork/lnd/lnwallet/chainfee" + "github.com/lightningnetwork/lnd/lnwallet/chanfunding" "github.com/lightningnetwork/lnd/macaroons" "github.com/lightningnetwork/lnd/sweep" "google.golang.org/grpc" @@ -1234,10 +1235,11 @@ func (w *WalletKit) FundPsbt(_ context.Context, account = req.Account } - // There are two ways a user can specify what we call the template (a + // There are three ways a user can specify what we call the template (a // list of inputs and outputs to use in the PSBT): Either as a PSBT - // packet directly or as a special RPC message. Find out which one the - // user wants to use, they are mutually exclusive. + // packet directly with no coin selection, a PSBT with coin selection or + // as a special RPC message. Find out which one the user wants to use, + // they are mutually exclusive. switch { // The template is specified as a PSBT. All we have to do is parse it. case req.GetPsbt() != nil: @@ -1254,6 +1256,82 @@ func (w *WalletKit) FundPsbt(_ context.Context, packet, minConfs, feeSatPerKW, ) + // The template is specified as a PSBT with the intention to perform + // coin selection even if inputs are already present. + case req.GetCoinSelect() != nil: + coinSelectRequest := req.GetCoinSelect() + r := bytes.NewReader(coinSelectRequest.Psbt) + packet, err := psbt.NewFromRawBytes(r, false) + if err != nil { + return nil, fmt.Errorf("could not parse PSBT: %w", err) + } + + numOutputs := int32(len(packet.UnsignedTx.TxOut)) + if numOutputs == 0 { + return nil, fmt.Errorf("no outputs specified in " + + "template") + } + + outputSum := int64(0) + for _, txOut := range packet.UnsignedTx.TxOut { + outputSum += txOut.Value + } + if outputSum <= 0 { + return nil, fmt.Errorf("output sum must be positive") + } + + var ( + changeIndex int32 = -1 + changeType chanfunding.ChangeAddressType + ) + switch t := coinSelectRequest.ChangeOutput.(type) { + // The user wants to use an existing output as change output. + case *PsbtCoinSelect_ExistingOutputIndex: + if t.ExistingOutputIndex < 0 || + t.ExistingOutputIndex >= numOutputs { + + return nil, fmt.Errorf("change output index "+ + "out of range: %d", + t.ExistingOutputIndex) + } + + changeIndex = t.ExistingOutputIndex + + changeOut := packet.UnsignedTx.TxOut[changeIndex] + _, err := txscript.ParsePkScript(changeOut.PkScript) + if err != nil { + return nil, fmt.Errorf("error parsing change "+ + "script: %w", err) + } + + changeType = chanfunding.ExistingChangeAddress + + // The user wants to use a new output as change output. + case *PsbtCoinSelect_Add: + // We already set the change index to -1 above to + // indicate no change output should be used if possible + // or a new one should be created if needed. So we only + // need to parse the type of change output we want to + // create. + switch req.ChangeType { + case ChangeAddressType_CHANGE_ADDRESS_TYPE_P2TR: + changeType = chanfunding.P2TRChangeAddress + + default: + changeType = chanfunding.P2WKHChangeAddress + } + + default: + return nil, fmt.Errorf("unknown change output type") + } + + // Run the actual funding process now, using the channel funding + // coin selection algorithm. + return w.fundPsbtCoinSelect( + account, changeIndex, packet, minConfs, changeType, + feeSatPerKW, + ) + // The template is specified as a RPC message. We need to create a new // PSBT and copy the RPC information over. case req.GetRaw() != nil: @@ -1385,6 +1463,242 @@ func (w *WalletKit) fundPsbtInternalWallet(account string, return response, nil } +// fundPsbtCoinSelect uses the "new" PSBT funding method using the channel +// funding coin selection algorithm that allows specifying custom inputs while +// selecting coins. +func (w *WalletKit) fundPsbtCoinSelect(account string, changeIndex int32, + packet *psbt.Packet, minConfs int32, + changeType chanfunding.ChangeAddressType, + feeRate chainfee.SatPerKWeight) (*FundPsbtResponse, error) { + + // We want to make sure we don't select any inputs that are already + // specified in the template. To do that, we require those inputs to + // either not belong to this lnd at all or to be already locked through + // a manual lock call by the user. Either way, they should not appear in + // the list of unspent outputs. + err := w.assertNotAvailable(packet.UnsignedTx.TxIn, minConfs, account) + if err != nil { + return nil, err + } + + // In case the user just specified the input outpoints of UTXOs we own, + // the fee estimation below will error out because the UTXO information + // is missing. We need to fetch the UTXO information from the wallet + // and add it to the PSBT. We ignore inputs we don't actually know as + // they could belong to another wallet. + err = w.cfg.Wallet.DecorateInputs(packet, false) + if err != nil { + return nil, fmt.Errorf("error decorating inputs: %w", err) + } + + // Before we select anything, we need to calculate the input, output and + // current weight amounts. While doing that we also ensure the PSBT has + // all the required information we require at this step. + var ( + inputSum, outputSum btcutil.Amount + estimator input.TxWeightEstimator + ) + for i := range packet.Inputs { + in := packet.Inputs[i] + + err := btcwallet.EstimateInputWeight(&in, &estimator) + if err != nil { + return nil, fmt.Errorf("error estimating input "+ + "weight: %w", err) + } + + inputSum += btcutil.Amount(in.WitnessUtxo.Value) + } + for i := range packet.UnsignedTx.TxOut { + out := packet.UnsignedTx.TxOut[i] + + estimator.AddOutput(out.PkScript) + outputSum += btcutil.Amount(out.Value) + } + + // The amount we want to fund is the total output sum plus the current + // fee estimate, minus the sum of any already specified inputs. Since we + // pass the estimator of the current transaction into the coin selection + // algorithm, we don't need to subtract the fees here. + fundingAmount := outputSum - inputSum + + var changeDustLimit btcutil.Amount + switch changeType { + case chanfunding.P2TRChangeAddress: + changeDustLimit = lnwallet.DustLimitForSize(input.P2TRSize) + + case chanfunding.P2WKHChangeAddress: + changeDustLimit = lnwallet.DustLimitForSize(input.P2WPKHSize) + + case chanfunding.ExistingChangeAddress: + changeOut := packet.UnsignedTx.TxOut[changeIndex] + changeDustLimit = lnwallet.DustLimitForSize( + len(changeOut.PkScript), + ) + } + + // Do we already have enough inputs specified to pay for the TX as it + // is? In that case we only need to allocate any change, if there is + // any. + packetFeeNoChange := feeRate.FeeForWeight(int64(estimator.Weight())) + if inputSum >= outputSum+packetFeeNoChange { + // Calculate the packet's fee with a change output so, so we can + // let the coin selection algorithm decide whether to use a + // change output or not. + switch changeType { + case chanfunding.P2TRChangeAddress: + estimator.AddP2TROutput() + + case chanfunding.P2WKHChangeAddress: + estimator.AddP2WKHOutput() + } + packetFeeWithChange := feeRate.FeeForWeight( + int64(estimator.Weight()), + ) + + changeAmt, needMore, err := chanfunding.CalculateChangeAmount( + inputSum, outputSum, packetFeeNoChange, + packetFeeWithChange, changeDustLimit, changeType, + ) + if err != nil { + return nil, fmt.Errorf("error calculating change "+ + "amount: %w", err) + } + + // We shouldn't get into this branch if the input sum isn't + // enough to pay for the current package without a change + // output. So this should never be non-zero. + if needMore != 0 { + return nil, fmt.Errorf("internal error with change " + + "amount calculation") + } + + if changeAmt > 0 { + changeIndex, err = w.handleChange( + packet, changeIndex, int64(changeAmt), + changeType, account, + ) + if err != nil { + return nil, fmt.Errorf("error handling change "+ + "amount: %w", err) + } + } + + // We're done. Let's serialize and return the updated package. + return w.lockAndCreateFundingResponse(packet, nil, changeIndex) + } + + // The RPC parsing part is now over. Several of the following operations + // require us to hold the global coin selection lock, so we do the rest + // of the tasks while holding the lock. The result is a list of locked + // UTXOs. + var response *FundPsbtResponse + err = w.cfg.CoinSelectionLocker.WithCoinSelectLock(func() error { + // Get a list of all unspent witness outputs. + utxos, err := w.cfg.Wallet.ListUnspentWitness( + minConfs, defaultMaxConf, account, + ) + if err != nil { + return err + } + + coins := make([]base.Coin, len(utxos)) + for i, utxo := range utxos { + coins[i] = base.Coin{ + TxOut: wire.TxOut{ + Value: int64(utxo.Value), + PkScript: utxo.PkScript, + }, + OutPoint: utxo.OutPoint, + } + } + + selectedCoins, changeAmount, err := chanfunding.CoinSelect( + feeRate, fundingAmount, changeDustLimit, coins, + w.cfg.CoinSelectionStrategy, estimator, changeType, + ) + if err != nil { + return fmt.Errorf("error selecting coins: %w", err) + } + + if changeAmount > 0 { + changeIndex, err = w.handleChange( + packet, changeIndex, int64(changeAmount), + changeType, account, + ) + if err != nil { + return fmt.Errorf("error handling change "+ + "amount: %w", err) + } + } + + addedOutpoints := make([]wire.OutPoint, len(selectedCoins)) + for i := range selectedCoins { + coin := selectedCoins[i] + addedOutpoints[i] = coin.OutPoint + + packet.UnsignedTx.TxIn = append( + packet.UnsignedTx.TxIn, &wire.TxIn{ + PreviousOutPoint: coin.OutPoint, + }, + ) + packet.Inputs = append(packet.Inputs, psbt.PInput{ + WitnessUtxo: &coin.TxOut, + }) + } + + // Now that we've added the bare TX inputs, we also need to add + // the more verbose input information to the packet, so a future + // signer doesn't need to do any lookups. We skip any inputs + // that our wallet doesn't own. + err = w.cfg.Wallet.DecorateInputs(packet, false) + if err != nil { + return fmt.Errorf("error decorating inputs: %w", err) + } + + response, err = w.lockAndCreateFundingResponse( + packet, addedOutpoints, changeIndex, + ) + + return err + }) + if err != nil { + return nil, err + } + + return response, nil +} + +// assertNotAvailable makes sure the specified inputs either don't belong to +// this node or are already locked by the user. +func (w *WalletKit) assertNotAvailable(inputs []*wire.TxIn, minConfs int32, + account string) error { + + return w.cfg.CoinSelectionLocker.WithCoinSelectLock(func() error { + // Get a list of all unspent witness outputs. + utxos, err := w.cfg.Wallet.ListUnspentWitness( + minConfs, defaultMaxConf, account, + ) + if err != nil { + return fmt.Errorf("error fetching UTXOs: %w", err) + } + + // We'll now check that none of the inputs specified in the + // template are available to us. That means they either don't + // belong to us or are already locked by the user. + for _, txIn := range inputs { + for _, utxo := range utxos { + if txIn.PreviousOutPoint == utxo.OutPoint { + return fmt.Errorf("input %v is not "+ + "locked", txIn.PreviousOutPoint) + } + } + } + + return nil + }) +} + // lockAndCreateFundingResponse locks the given outpoints and creates a funding // response with the serialized PSBT, the change index and the locked UTXOs. func (w *WalletKit) lockAndCreateFundingResponse(packet *psbt.Packet, @@ -1415,6 +1729,47 @@ func (w *WalletKit) lockAndCreateFundingResponse(packet *psbt.Packet, }, nil } +// handleChange is a closure that either adds the non-zero change amount to an +// existing output or creates a change output. The function returns the new +// change output index if a new change output was added. +func (w *WalletKit) handleChange(packet *psbt.Packet, changeIndex int32, + changeAmount int64, changeType chanfunding.ChangeAddressType, + changeAccount string) (int32, error) { + + // Does an existing output get the change? + if changeIndex >= 0 { + changeOut := packet.UnsignedTx.TxOut[changeIndex] + changeOut.Value += changeAmount + + return changeIndex, nil + } + + // The user requested a new change output. + addrType := addrTypeFromChangeAddressType(changeType) + changeAddr, err := w.cfg.Wallet.NewAddress( + addrType, true, changeAccount, + ) + if err != nil { + return 0, fmt.Errorf("could not derive change address: %w", err) + } + + changeScript, err := txscript.PayToAddrScript(changeAddr) + if err != nil { + return 0, fmt.Errorf("could not derive change script: %w", err) + } + + newChangeIndex := int32(len(packet.Outputs)) + packet.UnsignedTx.TxOut = append( + packet.UnsignedTx.TxOut, &wire.TxOut{ + Value: changeAmount, + PkScript: changeScript, + }, + ) + packet.Outputs = append(packet.Outputs, psbt.POutput{}) + + return newChangeIndex, nil +} + // marshallLeases converts the lock leases to the RPC format. func marshallLeases(locks []*base.ListLeasedOutputResult) []*UtxoLease { rpcLocks := make([]*UtxoLease, len(locks)) @@ -1448,6 +1803,20 @@ func keyScopeFromChangeAddressType( } } +// addrTypeFromChangeAddressType maps a chanfunding.ChangeAddressType to the +// lnwallet.AddressType. +func addrTypeFromChangeAddressType( + changeAddressType chanfunding.ChangeAddressType) lnwallet.AddressType { + + switch changeAddressType { + case chanfunding.P2TRChangeAddress: + return lnwallet.TaprootPubkey + + default: + return lnwallet.WitnessPubKey + } +} + // SignPsbt expects a partial transaction with all inputs and outputs fully // declared and tries to sign all unsigned inputs that have all required fields // (UTXO information, BIP32 derivation information, witness or sig scripts) diff --git a/lnrpc/walletrpc/walletkit_server_test.go b/lnrpc/walletrpc/walletkit_server_test.go index 82603fdb5c..b8d581fcfc 100644 --- a/lnrpc/walletrpc/walletkit_server_test.go +++ b/lnrpc/walletrpc/walletkit_server_test.go @@ -4,9 +4,24 @@ package walletrpc import ( + "bytes" + "fmt" "strings" "testing" + "github.com/btcsuite/btcd/btcec/v2" + "github.com/btcsuite/btcd/btcec/v2/schnorr" + "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/psbt" + "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/btcsuite/btcd/txscript" + "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btcwallet/wallet" + "github.com/lightningnetwork/lnd/input" + "github.com/lightningnetwork/lnd/lntest/mock" + "github.com/lightningnetwork/lnd/lnwallet" + "github.com/lightningnetwork/lnd/lnwallet/chainfee" + "github.com/lightningnetwork/lnd/lnwallet/chanfunding" "github.com/stretchr/testify/require" ) @@ -48,3 +63,570 @@ func TestWitnessTypeMapping(t *testing.T) { }) } } + +type mockCoinSelectionLocker struct { + fail bool +} + +func (m *mockCoinSelectionLocker) WithCoinSelectLock(f func() error) error { + if err := f(); err != nil { + return err + } + + if m.fail { + return fmt.Errorf("kek") + } + + return nil +} + +// TestFundPsbtCoinSelect tests that the coin selection for a PSBT template +// works as expected. +func TestFundPsbtCoinSelect(t *testing.T) { + t.Parallel() + + const fundAmt = 50_000 + var ( + p2wkhDustLimit = lnwallet.DustLimitForSize(input.P2WPKHSize) + p2trDustLimit = lnwallet.DustLimitForSize(input.P2TRSize) + p2wkhScript, _ = input.WitnessPubKeyHash([]byte{}) + p2trScript, _ = txscript.PayToTaprootScript( + &input.TaprootNUMSKey, + ) + ) + + makePacket := func(outs ...*wire.TxOut) *psbt.Packet { + p := &psbt.Packet{ + UnsignedTx: &wire.MsgTx{}, + } + + for _, out := range outs { + p.UnsignedTx.TxOut = append(p.UnsignedTx.TxOut, out) + p.Outputs = append(p.Outputs, psbt.POutput{}) + } + + return p + } + updatePacket := func(p *psbt.Packet, + f func(*psbt.Packet) *psbt.Packet) *psbt.Packet { + + return f(p) + } + calcFee := func(p2trIn, p2wkhIn, p2trOut, p2wkhOut int, + dust btcutil.Amount) btcutil.Amount { + + estimator := input.TxWeightEstimator{} + for i := 0; i < p2trIn; i++ { + estimator.AddTaprootKeySpendInput( + txscript.SigHashDefault, + ) + } + for i := 0; i < p2wkhIn; i++ { + estimator.AddP2WKHInput() + } + for i := 0; i < p2trOut; i++ { + estimator.AddP2TROutput() + } + for i := 0; i < p2wkhOut; i++ { + estimator.AddP2WKHOutput() + } + + weight := estimator.Weight() + fee := chainfee.FeePerKwFloor.FeeForWeight(int64(weight)) + + return fee + dust + } + + testCases := []struct { + name string + utxos []*lnwallet.Utxo + packet *psbt.Packet + changeIndex int32 + changeType chanfunding.ChangeAddressType + feeRate chainfee.SatPerKWeight + + // expectedUtxoIndexes is the list of utxo indexes that are + // expected to be used for funding the psbt. + expectedUtxoIndexes []int + + // expectChangeOutputIndex is the expected output index that is + // returned from the tested method. + expectChangeOutputIndex int32 + + // expectedChangeOutputAmount is the expected final total amount + // of the output marked as the change output. This will only be + // checked if the expected amount is non-zero. + expectedChangeOutputAmount btcutil.Amount + + // expectedFee is the total amount of fees paid by the funded + // packet in bytes. + expectedFee btcutil.Amount + + // expectedErr is the expected concrete error. If not nil, then + // the error must match exactly. + expectedErr error + + // expectedErrType is the expected error type. If not nil, then + // the error must be of this type. + expectedErrType error + }{{ + name: "no utxos", + utxos: []*lnwallet.Utxo{}, + packet: makePacket(&wire.TxOut{ + Value: fundAmt, + PkScript: p2trScript, + }), + changeIndex: -1, + feeRate: chainfee.FeePerKwFloor, + expectedErrType: &chanfunding.ErrInsufficientFunds{}, + }, { + name: "1 p2wpkh utxo, add p2wkh change", + utxos: []*lnwallet.Utxo{ + { + Value: 100_000, + PkScript: p2wkhScript, + }, + }, + packet: makePacket(&wire.TxOut{ + Value: fundAmt, + PkScript: p2trScript, + }), + changeIndex: -1, + feeRate: chainfee.FeePerKwFloor, + expectedUtxoIndexes: []int{0}, + expectChangeOutputIndex: 1, + expectedFee: calcFee(0, 1, 1, 1, 0), + }, { + name: "1 p2wpkh utxo, add p2tr change", + utxos: []*lnwallet.Utxo{ + { + Value: 100_000, + PkScript: p2wkhScript, + }, + }, + packet: makePacket(&wire.TxOut{ + Value: fundAmt, + PkScript: p2trScript, + }), + changeIndex: -1, + feeRate: chainfee.FeePerKwFloor, + changeType: chanfunding.P2TRChangeAddress, + expectedUtxoIndexes: []int{0}, + expectChangeOutputIndex: 1, + expectedFee: calcFee(0, 1, 2, 0, 0), + }, { + name: "1 p2wpkh utxo, no change, exact amount", + utxos: []*lnwallet.Utxo{ + { + Value: fundAmt + 123, + PkScript: p2wkhScript, + }, + }, + packet: makePacket(&wire.TxOut{ + Value: fundAmt, + PkScript: p2trScript, + }), + changeIndex: -1, + feeRate: chainfee.FeePerKwFloor, + expectedUtxoIndexes: []int{0}, + expectChangeOutputIndex: -1, + expectedFee: calcFee(0, 1, 1, 0, 0), + }, { + name: "1 p2wpkh utxo, no change, p2wpkh change dust to fee", + utxos: []*lnwallet.Utxo{ + { + Value: fundAmt + calcFee( + 0, 1, 1, 0, p2wkhDustLimit-1, + ), + PkScript: p2wkhScript, + }, + }, + packet: makePacket(&wire.TxOut{ + Value: fundAmt, + PkScript: p2trScript, + }), + changeIndex: -1, + feeRate: chainfee.FeePerKwFloor, + changeType: chanfunding.P2WKHChangeAddress, + expectedUtxoIndexes: []int{0}, + expectChangeOutputIndex: -1, + expectedFee: calcFee(0, 1, 1, 0, p2wkhDustLimit-1), + }, { + name: "1 p2wpkh utxo, no change, p2tr change dust to fee", + utxos: []*lnwallet.Utxo{ + { + Value: fundAmt + calcFee( + 0, 1, 1, 0, p2trDustLimit-1, + ), + PkScript: p2wkhScript, + }, + }, + packet: makePacket(&wire.TxOut{ + Value: fundAmt, + PkScript: p2trScript, + }), + changeIndex: -1, + feeRate: chainfee.FeePerKwFloor, + changeType: chanfunding.P2TRChangeAddress, + expectedUtxoIndexes: []int{0}, + expectChangeOutputIndex: -1, + expectedFee: calcFee(0, 1, 1, 0, p2trDustLimit-1), + }, { + name: "1 p2wpkh utxo, existing p2tr change", + utxos: []*lnwallet.Utxo{ + { + Value: fundAmt + 50_000, + PkScript: p2wkhScript, + }, + }, + packet: makePacket(&wire.TxOut{ + Value: fundAmt, + PkScript: p2trScript, + }), + changeIndex: 0, + feeRate: chainfee.FeePerKwFloor, + changeType: chanfunding.ExistingChangeAddress, + expectedUtxoIndexes: []int{0}, + expectChangeOutputIndex: 0, + expectedFee: calcFee(0, 1, 1, 0, 0), + }, { + name: "1 p2wpkh utxo, existing p2wkh change", + utxos: []*lnwallet.Utxo{ + { + Value: fundAmt + 50_000, + PkScript: p2wkhScript, + }, + }, + packet: makePacket(&wire.TxOut{ + Value: fundAmt, + PkScript: p2wkhScript, + }), + changeIndex: 0, + feeRate: chainfee.FeePerKwFloor, + changeType: chanfunding.ExistingChangeAddress, + expectedUtxoIndexes: []int{0}, + expectChangeOutputIndex: 0, + expectedFee: calcFee(0, 1, 0, 1, 0), + }, { + name: "1 p2wpkh utxo, existing p2wkh change, dust change", + utxos: []*lnwallet.Utxo{ + { + Value: fundAmt + calcFee(0, 1, 0, 1, 0) + 50, + PkScript: p2wkhScript, + }, + }, + packet: makePacket(&wire.TxOut{ + Value: fundAmt, + PkScript: p2wkhScript, + }), + changeIndex: 0, + feeRate: chainfee.FeePerKwFloor, + changeType: chanfunding.ExistingChangeAddress, + expectedUtxoIndexes: []int{0}, + expectChangeOutputIndex: 0, + expectedFee: calcFee(0, 1, 0, 1, 0), + }, { + name: "1 p2wpkh + 1 p2tr utxo, existing p2tr input, existing " + + "p2tr change", + utxos: []*lnwallet.Utxo{ + { + Value: fundAmt / 2, + PkScript: p2wkhScript, + }, { + Value: fundAmt / 2, + PkScript: p2trScript, + }, + }, + packet: updatePacket(makePacket(&wire.TxOut{ + Value: fundAmt, + PkScript: p2trScript, + }), func(p *psbt.Packet) *psbt.Packet { + p.UnsignedTx.TxIn = append( + p.UnsignedTx.TxIn, &wire.TxIn{ + PreviousOutPoint: wire.OutPoint{ + Hash: chainhash.Hash{1, 2, 3}, + }, + }, + ) + p2TrDerivations := []*psbt.TaprootBip32Derivation{ + { + XOnlyPubKey: schnorr.SerializePubKey( + &input.TaprootNUMSKey, + ), + Bip32Path: []uint32{1, 2, 3}, + }, + } + p.Inputs = append(p.Inputs, psbt.PInput{ + WitnessUtxo: &wire.TxOut{ + Value: 1000, + PkScript: p2trScript, + }, + SighashType: txscript.SigHashSingle, + TaprootBip32Derivation: p2TrDerivations, + }) + + return p + }), + changeIndex: 0, + feeRate: chainfee.FeePerKwFloor, + changeType: chanfunding.ExistingChangeAddress, + expectedUtxoIndexes: []int{0, 1}, + expectChangeOutputIndex: 0, + expectedFee: calcFee(2, 1, 1, 0, 0), + }, { + name: "1 p2wpkh + 1 p2tr utxo, existing p2tr input, add p2tr " + + "change", + utxos: []*lnwallet.Utxo{ + { + Value: fundAmt / 2, + PkScript: p2wkhScript, + }, { + Value: fundAmt / 2, + PkScript: p2trScript, + }, + }, + packet: updatePacket(makePacket(&wire.TxOut{ + Value: fundAmt, + PkScript: p2trScript, + }), func(p *psbt.Packet) *psbt.Packet { + p.UnsignedTx.TxIn = append( + p.UnsignedTx.TxIn, &wire.TxIn{ + PreviousOutPoint: wire.OutPoint{ + Hash: chainhash.Hash{1, 2, 3}, + }, + }, + ) + p2TrDerivations := []*psbt.TaprootBip32Derivation{ + { + XOnlyPubKey: schnorr.SerializePubKey( + &input.TaprootNUMSKey, + ), + Bip32Path: []uint32{1, 2, 3}, + }, + } + p.Inputs = append(p.Inputs, psbt.PInput{ + WitnessUtxo: &wire.TxOut{ + Value: 1000, + PkScript: p2trScript, + }, + SighashType: txscript.SigHashSingle, + TaprootBip32Derivation: p2TrDerivations, + }) + + return p + }), + changeIndex: -1, + feeRate: chainfee.FeePerKwFloor, + changeType: chanfunding.P2TRChangeAddress, + expectedUtxoIndexes: []int{0, 1}, + expectChangeOutputIndex: 1, + expectedFee: calcFee(2, 1, 2, 0, 0), + }, { + name: "large existing p2tr input, fee estimation p2wpkh " + + "change", + utxos: []*lnwallet.Utxo{}, + packet: updatePacket(makePacket(&wire.TxOut{ + Value: fundAmt, + PkScript: p2trScript, + }), func(p *psbt.Packet) *psbt.Packet { + p.UnsignedTx.TxIn = append( + p.UnsignedTx.TxIn, &wire.TxIn{ + PreviousOutPoint: wire.OutPoint{ + Hash: chainhash.Hash{1, 2, 3}, + }, + }, + ) + p2TrDerivations := []*psbt.TaprootBip32Derivation{ + { + XOnlyPubKey: schnorr.SerializePubKey( + &input.TaprootNUMSKey, + ), + Bip32Path: []uint32{1, 2, 3}, + }, + } + p.Inputs = append(p.Inputs, psbt.PInput{ + WitnessUtxo: &wire.TxOut{ + Value: fundAmt * 3, + PkScript: p2trScript, + }, + TaprootBip32Derivation: p2TrDerivations, + }) + + return p + }), + changeIndex: -1, + feeRate: chainfee.FeePerKwFloor, + changeType: chanfunding.P2WKHChangeAddress, + expectedUtxoIndexes: []int{}, + expectChangeOutputIndex: 1, + expectedChangeOutputAmount: fundAmt*3 - fundAmt - + calcFee(1, 0, 1, 1, 0), + expectedFee: calcFee(1, 0, 1, 1, 0), + }, { + name: "large existing p2tr input, fee estimation no change", + utxos: []*lnwallet.Utxo{}, + packet: updatePacket(makePacket(&wire.TxOut{ + Value: fundAmt, + PkScript: p2trScript, + }), func(p *psbt.Packet) *psbt.Packet { + p.UnsignedTx.TxIn = append( + p.UnsignedTx.TxIn, &wire.TxIn{ + PreviousOutPoint: wire.OutPoint{ + Hash: chainhash.Hash{1, 2, 3}, + }, + }, + ) + p2TrDerivations := []*psbt.TaprootBip32Derivation{ + { + XOnlyPubKey: schnorr.SerializePubKey( + &input.TaprootNUMSKey, + ), + Bip32Path: []uint32{1, 2, 3}, + }, + } + p.Inputs = append(p.Inputs, psbt.PInput{ + WitnessUtxo: &wire.TxOut{ + Value: fundAmt + + int64(calcFee(1, 0, 1, 0, 0)), + PkScript: p2trScript, + }, + TaprootBip32Derivation: p2TrDerivations, + }) + + return p + }), + changeIndex: -1, + feeRate: chainfee.FeePerKwFloor, + changeType: chanfunding.P2TRChangeAddress, + expectedUtxoIndexes: []int{}, + expectChangeOutputIndex: -1, + expectedFee: calcFee(1, 0, 1, 0, 0), + }, { + name: "large existing p2tr input, fee estimation existing " + + "change output", + utxos: []*lnwallet.Utxo{}, + packet: updatePacket(makePacket(&wire.TxOut{ + Value: fundAmt, + PkScript: p2trScript, + }), func(p *psbt.Packet) *psbt.Packet { + p.UnsignedTx.TxIn = append( + p.UnsignedTx.TxIn, &wire.TxIn{ + PreviousOutPoint: wire.OutPoint{ + Hash: chainhash.Hash{1, 2, 3}, + }, + }, + ) + p2TrDerivations := []*psbt.TaprootBip32Derivation{ + { + XOnlyPubKey: schnorr.SerializePubKey( + &input.TaprootNUMSKey, + ), + Bip32Path: []uint32{1, 2, 3}, + }, + } + p.Inputs = append(p.Inputs, psbt.PInput{ + WitnessUtxo: &wire.TxOut{ + Value: fundAmt * 2, + PkScript: p2trScript, + }, + TaprootBip32Derivation: p2TrDerivations, + }) + + return p + }), + changeIndex: 0, + feeRate: chainfee.FeePerKwFloor, + changeType: chanfunding.ExistingChangeAddress, + expectedUtxoIndexes: []int{}, + expectChangeOutputIndex: 0, + expectedChangeOutputAmount: fundAmt*2 - calcFee(1, 0, 1, 0, 0), + expectedFee: calcFee(1, 0, 1, 0, 0), + }} + + for _, tc := range testCases { + tc := tc + + privKey, err := btcec.NewPrivateKey() + require.NoError(t, err) + + walletMock := &mock.WalletController{ + RootKey: privKey, + Utxos: tc.utxos, + } + rpcServer, _, err := New(&Config{ + Wallet: walletMock, + CoinSelectionLocker: &mockCoinSelectionLocker{}, + CoinSelectionStrategy: wallet.CoinSelectionLargest, + }) + require.NoError(t, err) + + t.Run(tc.name, func(tt *testing.T) { + // To avoid our packet being mutated, we'll make a deep + // copy of it, so we can still use the original in the + // test case to compare the results to. + var buf bytes.Buffer + err := tc.packet.Serialize(&buf) + require.NoError(tt, err) + + copiedPacket, err := psbt.NewFromRawBytes(&buf, false) + require.NoError(tt, err) + + resp, err := rpcServer.fundPsbtCoinSelect( + "", tc.changeIndex, copiedPacket, 0, + tc.changeType, tc.feeRate, + ) + + switch { + case tc.expectedErr != nil: + require.Error(tt, err) + require.ErrorIs(tt, err, tc.expectedErr) + + return + + case tc.expectedErrType != nil: + require.Error(tt, err) + require.ErrorAs(tt, err, &tc.expectedErr) + + return + } + + require.NoError(tt, err) + require.NotNil(tt, resp) + + resultPacket, err := psbt.NewFromRawBytes( + bytes.NewReader(resp.FundedPsbt), false, + ) + require.NoError(tt, err) + resultTx := resultPacket.UnsignedTx + + expectedNumInputs := len(tc.expectedUtxoIndexes) + + len(tc.packet.Inputs) + require.Len(tt, resultPacket.Inputs, expectedNumInputs) + require.Len(tt, resultTx.TxIn, expectedNumInputs) + require.Equal( + tt, tc.expectChangeOutputIndex, + resp.ChangeOutputIndex, + ) + + fee, err := resultPacket.GetTxFee() + require.NoError(tt, err) + require.EqualValues(tt, tc.expectedFee, fee) + + if tc.expectedChangeOutputAmount != 0 { + changeIdx := resp.ChangeOutputIndex + require.GreaterOrEqual(tt, changeIdx, int32(-1)) + require.Less( + tt, changeIdx, + int32(len(resultTx.TxOut)), + ) + + changeOut := resultTx.TxOut[changeIdx] + + require.EqualValues( + tt, tc.expectedChangeOutputAmount, + changeOut.Value, + ) + } + }) + } +} From fb20cd598ef3213eb17637e1172e0ee2c694e9b4 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Fri, 9 Feb 2024 13:45:36 +0100 Subject: [PATCH 13/17] lnwallet+lnrpc: add derivation info for P2TR change addrs In some situations (for example in Taproot Assets), we need to be able to prove that an address is a bare BIP-0086 address that doesn't commit to any script. We can do that by providing the BIP-0032 derivation info and internal key. --- lnrpc/walletrpc/walletkit_server.go | 30 ++++++- lnwallet/btcwallet/psbt.go | 77 ++++++++++++++++ lnwallet/btcwallet/psbt_test.go | 134 ++++++++++++++++++++++++++++ lnwallet/btcwallet/signer_test.go | 10 +++ 4 files changed, 250 insertions(+), 1 deletion(-) diff --git a/lnrpc/walletrpc/walletkit_server.go b/lnrpc/walletrpc/walletkit_server.go index 2309e0ebca..799ed3d9a5 100644 --- a/lnrpc/walletrpc/walletkit_server.go +++ b/lnrpc/walletrpc/walletkit_server.go @@ -1758,6 +1758,34 @@ func (w *WalletKit) handleChange(packet *psbt.Packet, changeIndex int32, return 0, fmt.Errorf("could not derive change script: %w", err) } + // We need to add the derivation info for the change address in case it + // is a P2TR address. This is mostly to prove it's a bare BIP-0086 + // address, which is required for some protocols (such as Taproot + // Assets). + pOut := psbt.POutput{} + _, isTaprootChangeAddr := changeAddr.(*btcutil.AddressTaproot) + if isTaprootChangeAddr { + changeAddrInfo, err := w.cfg.Wallet.AddressInfo(changeAddr) + if err != nil { + return 0, fmt.Errorf("could not get address info: %w", + err) + } + + deriv, trDeriv, _, err := btcwallet.Bip32DerivationFromAddress( + changeAddrInfo, + ) + if err != nil { + return 0, fmt.Errorf("could not get derivation info: "+ + "%w", err) + } + + pOut.TaprootInternalKey = trDeriv.XOnlyPubKey + pOut.Bip32Derivation = []*psbt.Bip32Derivation{deriv} + pOut.TaprootBip32Derivation = []*psbt.TaprootBip32Derivation{ + trDeriv, + } + } + newChangeIndex := int32(len(packet.Outputs)) packet.UnsignedTx.TxOut = append( packet.UnsignedTx.TxOut, &wire.TxOut{ @@ -1765,7 +1793,7 @@ func (w *WalletKit) handleChange(packet *psbt.Packet, changeIndex int32, PkScript: changeScript, }, ) - packet.Outputs = append(packet.Outputs, psbt.POutput{}) + packet.Outputs = append(packet.Outputs, pOut) return newChangeIndex, nil } diff --git a/lnwallet/btcwallet/psbt.go b/lnwallet/btcwallet/psbt.go index ffb8fd2fd0..e655300c1f 100644 --- a/lnwallet/btcwallet/psbt.go +++ b/lnwallet/btcwallet/psbt.go @@ -9,12 +9,14 @@ import ( "github.com/btcsuite/btcd/btcec/v2" "github.com/btcsuite/btcd/btcec/v2/schnorr" "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/hdkeychain" "github.com/btcsuite/btcd/btcutil/psbt" "github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcwallet/waddrmgr" "github.com/btcsuite/btcwallet/wallet" "github.com/lightningnetwork/lnd/input" + "github.com/lightningnetwork/lnd/keychain" "github.com/lightningnetwork/lnd/lnwallet" "github.com/lightningnetwork/lnd/lnwallet/chainfee" ) @@ -640,3 +642,78 @@ func (b *BtcWallet) lookupFirstCustomAccount( return keyScope, account.AccountNumber, nil } + +// Bip32DerivationFromKeyDesc returns the default and Taproot BIP-0032 key +// derivation information from the given key descriptor information. +func Bip32DerivationFromKeyDesc(keyDesc keychain.KeyDescriptor, + coinType uint32) (*psbt.Bip32Derivation, *psbt.TaprootBip32Derivation, + string) { + + bip32Derivation := &psbt.Bip32Derivation{ + PubKey: keyDesc.PubKey.SerializeCompressed(), + Bip32Path: []uint32{ + keychain.BIP0043Purpose + hdkeychain.HardenedKeyStart, + coinType + hdkeychain.HardenedKeyStart, + uint32(keyDesc.Family) + + uint32(hdkeychain.HardenedKeyStart), + 0, + keyDesc.Index, + }, + } + + derivationPath := fmt.Sprintf( + "m/%d'/%d'/%d'/%d/%d", keychain.BIP0043Purpose, coinType, + keyDesc.Family, 0, keyDesc.Index, + ) + + return bip32Derivation, &psbt.TaprootBip32Derivation{ + XOnlyPubKey: bip32Derivation.PubKey[1:], + MasterKeyFingerprint: bip32Derivation.MasterKeyFingerprint, + Bip32Path: bip32Derivation.Bip32Path, + LeafHashes: make([][]byte, 0), + }, derivationPath +} + +// Bip32DerivationFromAddress returns the default and Taproot BIP-0032 key +// derivation information from the given managed address. +func Bip32DerivationFromAddress( + addr waddrmgr.ManagedAddress) (*psbt.Bip32Derivation, + *psbt.TaprootBip32Derivation, string, error) { + + pubKeyAddr, ok := addr.(waddrmgr.ManagedPubKeyAddress) + if !ok { + return nil, nil, "", fmt.Errorf("address is not a pubkey " + + "address") + } + + scope, derivationInfo, haveInfo := pubKeyAddr.DerivationInfo() + if !haveInfo { + return nil, nil, "", fmt.Errorf("address is an imported " + + "public key, can't derive BIP32 path") + } + + bip32Derivation := &psbt.Bip32Derivation{ + PubKey: pubKeyAddr.PubKey().SerializeCompressed(), + Bip32Path: []uint32{ + scope.Purpose + hdkeychain.HardenedKeyStart, + scope.Coin + hdkeychain.HardenedKeyStart, + derivationInfo.InternalAccount + + hdkeychain.HardenedKeyStart, + derivationInfo.Branch, + derivationInfo.Index, + }, + } + + derivationPath := fmt.Sprintf( + "m/%d'/%d'/%d'/%d/%d", scope.Purpose, scope.Coin, + derivationInfo.InternalAccount, derivationInfo.Branch, + derivationInfo.Index, + ) + + return bip32Derivation, &psbt.TaprootBip32Derivation{ + XOnlyPubKey: bip32Derivation.PubKey[1:], + MasterKeyFingerprint: bip32Derivation.MasterKeyFingerprint, + Bip32Path: bip32Derivation.Bip32Path, + LeafHashes: make([][]byte, 0), + }, derivationPath, nil +} diff --git a/lnwallet/btcwallet/psbt_test.go b/lnwallet/btcwallet/psbt_test.go index 74ec174adb..d3cf3f4139 100644 --- a/lnwallet/btcwallet/psbt_test.go +++ b/lnwallet/btcwallet/psbt_test.go @@ -17,6 +17,7 @@ import ( "github.com/btcsuite/btcwallet/waddrmgr" "github.com/lightningnetwork/lnd/input" "github.com/lightningnetwork/lnd/keychain" + "github.com/lightningnetwork/lnd/lnwallet" "github.com/stretchr/testify/require" ) @@ -495,3 +496,136 @@ func TestEstimateInputWeight(t *testing.T) { }) } } + +// TestBip32DerivationFromKeyDesc tests that we can correctly extract a BIP32 +// derivation path from a key descriptor. +func TestBip32DerivationFromKeyDesc(t *testing.T) { + privKey, err := btcec.NewPrivateKey() + require.NoError(t, err) + + testCases := []struct { + name string + keyDesc keychain.KeyDescriptor + coinType uint32 + expectedPath string + expectedBip32Path []uint32 + }{ + { + name: "testnet multi-sig family", + keyDesc: keychain.KeyDescriptor{ + PubKey: privKey.PubKey(), + KeyLocator: keychain.KeyLocator{ + Family: keychain.KeyFamilyMultiSig, + Index: 123, + }, + }, + coinType: chaincfg.TestNet3Params.HDCoinType, + expectedPath: "m/1017'/1'/0'/0/123", + expectedBip32Path: []uint32{ + hardenedKey(keychain.BIP0043Purpose), + hardenedKey(chaincfg.TestNet3Params.HDCoinType), + hardenedKey(uint32(keychain.KeyFamilyMultiSig)), + 0, 123, + }, + }, + { + name: "mainnet watchtower family", + keyDesc: keychain.KeyDescriptor{ + PubKey: privKey.PubKey(), + KeyLocator: keychain.KeyLocator{ + Family: keychain.KeyFamilyTowerSession, + Index: 456, + }, + }, + coinType: chaincfg.MainNetParams.HDCoinType, + expectedPath: "m/1017'/0'/8'/0/456", + expectedBip32Path: []uint32{ + hardenedKey(keychain.BIP0043Purpose), + hardenedKey(chaincfg.MainNetParams.HDCoinType), + hardenedKey( + uint32(keychain.KeyFamilyTowerSession), + ), + 0, 456, + }, + }, + } + + for _, tc := range testCases { + tc := tc + + t.Run(tc.name, func(tt *testing.T) { + d, trD, path := Bip32DerivationFromKeyDesc( + tc.keyDesc, tc.coinType, + ) + require.NoError(tt, err) + + require.Equal(tt, tc.expectedPath, path) + require.Equal(tt, tc.expectedBip32Path, d.Bip32Path) + require.Equal(tt, tc.expectedBip32Path, trD.Bip32Path) + + serializedKey := tc.keyDesc.PubKey.SerializeCompressed() + require.Equal(tt, serializedKey, d.PubKey) + require.Equal(tt, serializedKey[1:], trD.XOnlyPubKey) + }) + } +} + +// TestBip32DerivationFromAddress tests that we can correctly extract a BIP32 +// derivation path from an address. +func TestBip32DerivationFromAddress(t *testing.T) { + testCases := []struct { + name string + addrType lnwallet.AddressType + expectedAddr string + expectedPath string + expectedBip32Path []uint32 + expectedPubKey string + }{ + { + name: "p2wkh", + addrType: lnwallet.WitnessPubKey, + expectedAddr: firstAddress, + expectedPath: "m/84'/0'/0'/0/0", + expectedBip32Path: []uint32{ + hardenedKey(waddrmgr.KeyScopeBIP0084.Purpose), + hardenedKey(0), hardenedKey(0), 0, 0, + }, + expectedPubKey: firstAddressPubKey, + }, + { + name: "p2tr", + addrType: lnwallet.TaprootPubkey, + expectedAddr: firstAddressTaproot, + expectedPath: "m/86'/0'/0'/0/0", + expectedBip32Path: []uint32{ + hardenedKey(waddrmgr.KeyScopeBIP0086.Purpose), + hardenedKey(0), hardenedKey(0), 0, 0, + }, + expectedPubKey: firstAddressTaprootPubKey, + }, + } + + w, _ := newTestWallet(t, netParams, seedBytes) + for _, tc := range testCases { + tc := tc + + addr, err := w.NewAddress( + tc.addrType, false, lnwallet.DefaultAccountName, + ) + require.NoError(t, err) + + require.Equal(t, tc.expectedAddr, addr.String()) + + addrInfo, err := w.AddressInfo(addr) + require.NoError(t, err) + managedAddr, ok := addrInfo.(waddrmgr.ManagedPubKeyAddress) + require.True(t, ok) + + d, trD, path, err := Bip32DerivationFromAddress(managedAddr) + require.NoError(t, err) + + require.Equal(t, tc.expectedPath, path) + require.Equal(t, tc.expectedBip32Path, d.Bip32Path) + require.Equal(t, tc.expectedBip32Path, trD.Bip32Path) + } +} diff --git a/lnwallet/btcwallet/signer_test.go b/lnwallet/btcwallet/signer_test.go index 25e62b4dfb..d51714ad01 100644 --- a/lnwallet/btcwallet/signer_test.go +++ b/lnwallet/btcwallet/signer_test.go @@ -38,11 +38,21 @@ var ( // which is a special case for the BIP49/84 addresses in btcwallet). firstAddress = "bcrt1qgdlgjc5ede7fjv350wcjqat80m0zsmfaswsj9p" + // firstAddressPubKey is the public key of the first address that we + // should get from the wallet. + firstAddressPubKey = "02b844aecf8250c29e46894147a7dae02de55a034a533b6" + + "0c6a6469294ee356ce4" + // firstAddressTaproot is the first address that we should get from the // wallet when deriving a taproot address. firstAddressTaproot = "bcrt1ps8c222fgysvnsj2m8hxk8khy6wthcrhv9va9z3t4" + "h3qeyz65sh4qqwvdgc" + // firstAddressTaprootPubKey is the public key of the first address that + // we should get from the wallet when deriving a taproot address. + firstAddressTaprootPubKey = "03004113d6185c955d6e8f5922b50cc0ac3b64fa" + + "0979402604c5b887f07e3b5388" + testPubKeyBytes, _ = hex.DecodeString( "037a67771635344641d4b56aac33cd5f7a265b59678dce3aec31b89125e3" + "b8b9b2", From 54fa5805c26eb68946cc7a2630ccd83cd7fdfe0d Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Tue, 6 Feb 2024 12:25:59 +0100 Subject: [PATCH 14/17] lnwallet+lnrpc: add address index to ListAddresses For the itest in the next commit we'll need to be able to fetch the input information for an address over RPC. The only piece missing is the address' index, which we add in this commit. Everything else should be derivable from the ListAddresses and ListAccounts calls. --- lnrpc/walletrpc/walletkit.pb.go | 1184 ++++++++++++------------ lnrpc/walletrpc/walletkit.proto | 7 + lnrpc/walletrpc/walletkit.swagger.json | 9 + lnrpc/walletrpc/walletkit_server.go | 12 +- lnwallet/btcwallet/btcwallet.go | 30 +- lnwallet/interface.go | 6 + 6 files changed, 659 insertions(+), 589 deletions(-) diff --git a/lnrpc/walletrpc/walletkit.pb.go b/lnrpc/walletrpc/walletkit.pb.go index ef6ca4c8db..878fd8563c 100644 --- a/lnrpc/walletrpc/walletkit.pb.go +++ b/lnrpc/walletrpc/walletkit.pb.go @@ -1035,6 +1035,11 @@ type AddressProperty struct { IsInternal bool `protobuf:"varint,2,opt,name=is_internal,json=isInternal,proto3" json:"is_internal,omitempty"` // The balance of the address. Balance int64 `protobuf:"varint,3,opt,name=balance,proto3" json:"balance,omitempty"` + // The full derivation path of the address. This will be empty for imported + // addresses. + DerivationPath string `protobuf:"bytes,4,opt,name=derivation_path,json=derivationPath,proto3" json:"derivation_path,omitempty"` + // The public key of the address. This will be empty for imported addresses. + PublicKey []byte `protobuf:"bytes,5,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` } func (x *AddressProperty) Reset() { @@ -1090,6 +1095,20 @@ func (x *AddressProperty) GetBalance() int64 { return 0 } +func (x *AddressProperty) GetDerivationPath() string { + if x != nil { + return x.DerivationPath + } + return "" +} + +func (x *AddressProperty) GetPublicKey() []byte { + if x != nil { + return x.PublicKey + } + return nil +} + type AccountWithAddresses struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -4335,596 +4354,601 @@ var file_walletrpc_walletkit_proto_rawDesc = []byte{ 0x79, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x77, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x09, 0x77, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x6e, 0x6c, 0x79, 0x22, 0x66, - 0x0a, 0x0f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, - 0x79, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x69, - 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0a, 0x69, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x12, 0x18, 0x0a, 0x07, - 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x62, - 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x22, 0xc8, 0x01, 0x0a, 0x14, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x57, 0x69, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x77, 0x61, 0x6c, 0x6c, - 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x0b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, - 0x0a, 0x0f, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x74, - 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x74, 0x68, 0x12, 0x38, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x77, 0x61, 0x6c, - 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x72, - 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, - 0x73, 0x22, 0x64, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x01, 0x28, 0x08, 0x52, 0x09, 0x77, 0x61, 0x74, 0x63, 0x68, 0x4f, 0x6e, 0x6c, 0x79, 0x22, 0xae, + 0x01, 0x0a, 0x0f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, + 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b, + 0x69, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0a, 0x69, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x12, 0x18, 0x0a, + 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, + 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0e, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x74, 0x68, + 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x22, + 0xc8, 0x01, 0x0a, 0x14, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x57, 0x69, 0x74, 0x68, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, 0x46, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x2e, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x12, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x22, - 0x56, 0x0a, 0x16, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x1a, 0x61, 0x64, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x63, - 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x18, 0x61, - 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x43, - 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x22, 0x44, 0x0a, 0x17, 0x52, 0x65, 0x71, 0x75, 0x69, - 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x72, - 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x72, 0x65, - 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x22, 0x6b, 0x0a, - 0x14, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x68, 0x6f, 0x77, - 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x73, 0x68, 0x6f, 0x77, 0x43, 0x75, 0x73, 0x74, - 0x6f, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x22, 0x6e, 0x0a, 0x15, 0x4c, 0x69, - 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x16, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x77, - 0x69, 0x74, 0x68, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x57, 0x69, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x65, 0x73, 0x52, 0x14, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x57, 0x69, 0x74, - 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x22, 0x2b, 0x0a, 0x15, 0x47, 0x65, - 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x78, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x74, 0x78, 0x69, 0x64, 0x22, 0x42, 0x0a, 0x1a, 0x53, 0x69, 0x67, 0x6e, 0x4d, + 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0e, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x74, 0x68, + 0x12, 0x38, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, + 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x22, 0x64, 0x0a, 0x13, 0x4c, 0x69, + 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x77, 0x61, + 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x0b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, + 0x22, 0x46, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x77, 0x61, 0x6c, + 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x08, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x22, 0x56, 0x0a, 0x16, 0x52, 0x65, 0x71, 0x75, + 0x69, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x1a, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, + 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x18, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x61, 0x6c, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, + 0x22, 0x44, 0x0a, 0x17, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x72, + 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x52, + 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x22, 0x6b, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, + 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x68, 0x6f, 0x77, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x12, 0x73, 0x68, 0x6f, 0x77, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x73, 0x22, 0x6e, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x16, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x77, + 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x57, 0x69, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x14, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x57, 0x69, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x65, 0x73, 0x22, 0x2b, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x74, 0x78, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x78, 0x69, 0x64, + 0x22, 0x42, 0x0a, 0x1a, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x57, + 0x69, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, + 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6d, 0x73, 0x67, + 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x61, 0x64, 0x64, 0x72, 0x22, 0x3b, 0x0a, 0x1b, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x22, 0x62, 0x0a, 0x1c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, + 0x6d, 0x73, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x61, 0x64, 0x64, 0x72, 0x22, 0x4d, 0x0a, 0x1d, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x22, 0x3b, 0x0a, 0x1b, 0x53, - 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x41, 0x64, - 0x64, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x62, 0x0a, 0x1c, 0x56, 0x65, 0x72, 0x69, - 0x66, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x41, 0x64, 0x64, - 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x22, 0x4d, 0x0a, 0x1d, - 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, - 0x68, 0x41, 0x64, 0x64, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x22, 0xe4, 0x01, 0x0a, 0x14, - 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x50, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x34, 0x0a, 0x16, 0x6d, 0x61, 0x73, 0x74, - 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, - 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x14, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, - 0x4b, 0x65, 0x79, 0x46, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x12, 0x39, - 0x0a, 0x0c, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, - 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x72, 0x79, - 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x64, 0x72, 0x79, 0x52, - 0x75, 0x6e, 0x22, 0xaf, 0x01, 0x0a, 0x15, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x07, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, - 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x33, 0x0a, 0x16, 0x64, 0x72, - 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, 0x64, 0x72, 0x79, 0x52, - 0x75, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x73, 0x12, - 0x33, 0x0a, 0x16, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x13, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, - 0x64, 0x64, 0x72, 0x73, 0x22, 0x72, 0x0a, 0x16, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x75, - 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, - 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x39, 0x0a, - 0x0c, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, 0x19, 0x0a, 0x17, 0x49, 0x6d, 0x70, 0x6f, - 0x72, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0xa9, 0x02, 0x0a, 0x16, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, - 0x70, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, - 0x0a, 0x13, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, - 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x11, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x3b, - 0x0a, 0x09, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x74, 0x72, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x61, - 0x70, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x46, 0x75, 0x6c, 0x6c, 0x54, 0x72, 0x65, 0x65, 0x48, - 0x00, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x54, 0x72, 0x65, 0x65, 0x12, 0x4a, 0x0a, 0x0e, 0x70, - 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, - 0x54, 0x61, 0x70, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x50, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, - 0x52, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x0d, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, - 0x6c, 0x52, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x6f, 0x6f, 0x74, 0x5f, - 0x68, 0x61, 0x73, 0x68, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x48, - 0x00, 0x52, 0x0c, 0x72, 0x6f, 0x6f, 0x74, 0x48, 0x61, 0x73, 0x68, 0x4f, 0x6e, 0x6c, 0x79, 0x12, - 0x24, 0x0a, 0x0d, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0b, 0x66, 0x75, 0x6c, 0x6c, 0x4b, 0x65, - 0x79, 0x4f, 0x6e, 0x6c, 0x79, 0x42, 0x08, 0x0a, 0x06, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x22, - 0x46, 0x0a, 0x11, 0x54, 0x61, 0x70, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x46, 0x75, 0x6c, 0x6c, - 0x54, 0x72, 0x65, 0x65, 0x12, 0x31, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, 0x5f, 0x6c, 0x65, 0x61, 0x76, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, - 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x61, 0x70, 0x4c, 0x65, 0x61, 0x66, 0x52, 0x09, 0x61, 0x6c, - 0x6c, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x73, 0x22, 0x44, 0x0a, 0x07, 0x54, 0x61, 0x70, 0x4c, 0x65, - 0x61, 0x66, 0x12, 0x21, 0x0a, 0x0c, 0x6c, 0x65, 0x61, 0x66, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x6c, 0x65, 0x61, 0x66, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x22, 0x83, 0x01, - 0x0a, 0x16, 0x54, 0x61, 0x70, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x50, 0x61, 0x72, 0x74, 0x69, - 0x61, 0x6c, 0x52, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x12, 0x37, 0x0a, 0x0d, 0x72, 0x65, 0x76, 0x65, - 0x61, 0x6c, 0x65, 0x64, 0x5f, 0x6c, 0x65, 0x61, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x12, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x61, 0x70, 0x4c, - 0x65, 0x61, 0x66, 0x52, 0x0c, 0x72, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x65, 0x64, 0x4c, 0x65, 0x61, - 0x66, 0x12, 0x30, 0x0a, 0x14, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x73, - 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x12, 0x66, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, - 0x6f, 0x6f, 0x66, 0x22, 0x3c, 0x0a, 0x17, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x70, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, - 0x0a, 0x0c, 0x70, 0x32, 0x74, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x32, 0x74, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x22, 0x3a, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x15, 0x0a, 0x06, 0x74, 0x78, 0x5f, 0x68, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x05, 0x74, 0x78, 0x48, 0x65, 0x78, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x36, 0x0a, - 0x0f, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x5f, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, - 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x33, 0x0a, 0x19, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xbc, 0x01, 0x0a, 0x12, 0x53, - 0x65, 0x6e, 0x64, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1c, 0x0a, 0x0a, 0x73, 0x61, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x6b, 0x77, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x61, 0x74, 0x50, 0x65, 0x72, 0x4b, 0x77, 0x12, - 0x28, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x0e, 0x2e, 0x73, 0x69, 0x67, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x78, 0x4f, 0x75, 0x74, - 0x52, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, - 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, - 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x73, 0x12, 0x2b, 0x0a, 0x11, - 0x73, 0x70, 0x65, 0x6e, 0x64, 0x5f, 0x75, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, - 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x55, 0x6e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x22, 0x2c, 0x0a, 0x13, 0x53, 0x65, 0x6e, - 0x64, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x15, 0x0a, 0x06, 0x72, 0x61, 0x77, 0x5f, 0x74, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x05, 0x72, 0x61, 0x77, 0x54, 0x78, 0x22, 0x35, 0x0a, 0x12, 0x45, 0x73, 0x74, 0x69, 0x6d, - 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, - 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x22, 0x33, - 0x0a, 0x13, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x0a, 0x73, 0x61, 0x74, 0x5f, 0x70, 0x65, 0x72, - 0x5f, 0x6b, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x61, 0x74, 0x50, 0x65, - 0x72, 0x4b, 0x77, 0x22, 0xfc, 0x03, 0x0a, 0x0c, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, - 0x77, 0x65, 0x65, 0x70, 0x12, 0x2b, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4f, - 0x75, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x12, 0x39, 0x0a, 0x0c, 0x77, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, - 0x72, 0x70, 0x63, 0x2e, 0x57, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x0b, 0x77, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, - 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x73, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x09, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x61, 0x74, 0x12, 0x24, 0x0a, 0x0c, 0x73, - 0x61, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0d, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0a, 0x73, 0x61, 0x74, 0x50, 0x65, 0x72, 0x42, 0x79, 0x74, - 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x61, - 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11, 0x62, - 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, - 0x12, 0x32, 0x0a, 0x15, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, - 0x73, 0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x13, 0x6e, 0x65, 0x78, 0x74, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x48, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, - 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x43, 0x6f, - 0x6e, 0x66, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x37, 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x61, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x62, 0x79, - 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x02, 0x18, 0x01, 0x52, 0x13, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x53, 0x61, 0x74, 0x50, 0x65, 0x72, 0x42, 0x79, 0x74, - 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x73, 0x61, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x76, 0x62, 0x79, - 0x74, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x73, 0x61, 0x74, 0x50, 0x65, 0x72, - 0x56, 0x62, 0x79, 0x74, 0x65, 0x12, 0x35, 0x0a, 0x17, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x65, 0x64, 0x5f, 0x73, 0x61, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x76, 0x62, 0x79, 0x74, 0x65, - 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, - 0x64, 0x53, 0x61, 0x74, 0x50, 0x65, 0x72, 0x56, 0x62, 0x79, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, - 0x63, 0x65, 0x22, 0x16, 0x0a, 0x14, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x77, 0x65, - 0x65, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x57, 0x0a, 0x15, 0x50, 0x65, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x77, 0x65, 0x65, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0e, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x73, - 0x77, 0x65, 0x65, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x61, - 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, - 0x77, 0x65, 0x65, 0x70, 0x52, 0x0d, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x77, 0x65, - 0x65, 0x70, 0x73, 0x22, 0xbe, 0x01, 0x0a, 0x0e, 0x42, 0x75, 0x6d, 0x70, 0x46, 0x65, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, - 0x2e, 0x4f, 0x75, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x63, 0x6f, - 0x6e, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x24, 0x0a, 0x0c, 0x73, 0x61, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x5f, - 0x62, 0x79, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0a, - 0x73, 0x61, 0x74, 0x50, 0x65, 0x72, 0x42, 0x79, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, - 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, - 0x12, 0x22, 0x0a, 0x0d, 0x73, 0x61, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x76, 0x62, 0x79, 0x74, - 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x73, 0x61, 0x74, 0x50, 0x65, 0x72, 0x56, - 0x62, 0x79, 0x74, 0x65, 0x22, 0x29, 0x0a, 0x0f, 0x42, 0x75, 0x6d, 0x70, 0x46, 0x65, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, - 0x50, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x65, 0x65, 0x70, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x76, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x65, 0x12, 0x21, - 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x72, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x22, 0x80, 0x02, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x65, 0x65, 0x70, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, - 0x48, 0x00, 0x52, 0x12, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, - 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x57, 0x0a, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2c, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x53, 0x77, 0x65, 0x65, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x73, 0x48, 0x00, 0x52, - 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x1a, - 0x39, 0x0a, 0x0e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, - 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x42, 0x08, 0x0a, 0x06, 0x73, 0x77, - 0x65, 0x65, 0x70, 0x73, 0x22, 0x61, 0x0a, 0x17, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x12, 0x0a, 0x04, 0x74, 0x78, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x74, - 0x78, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x76, 0x65, - 0x72, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6f, 0x76, - 0x65, 0x72, 0x77, 0x72, 0x69, 0x74, 0x65, 0x22, 0x1a, 0x0a, 0x18, 0x4c, 0x61, 0x62, 0x65, 0x6c, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x90, 0x03, 0x0a, 0x0f, 0x46, 0x75, 0x6e, 0x64, 0x50, 0x73, 0x62, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x04, 0x70, 0x73, 0x62, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x04, 0x70, 0x73, 0x62, 0x74, 0x12, 0x29, 0x0a, - 0x03, 0x72, 0x61, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x77, 0x61, 0x6c, - 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, - 0x65, 0x48, 0x00, 0x52, 0x03, 0x72, 0x61, 0x77, 0x12, 0x3c, 0x0a, 0x0b, 0x63, 0x6f, 0x69, 0x6e, - 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x73, 0x62, 0x74, 0x43, 0x6f, - 0x69, 0x6e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x6f, 0x69, 0x6e, - 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x12, 0x21, 0x0a, 0x0b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0a, 0x74, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x61, 0x74, - 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x76, 0x62, 0x79, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, - 0x48, 0x01, 0x52, 0x0b, 0x73, 0x61, 0x74, 0x50, 0x65, 0x72, 0x56, 0x62, 0x79, 0x74, 0x65, 0x12, - 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6d, 0x69, - 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x5f, - 0x75, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x10, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x55, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, - 0x6d, 0x65, 0x64, 0x12, 0x3d, 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, - 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x42, 0x06, - 0x0a, 0x04, 0x66, 0x65, 0x65, 0x73, 0x22, 0x9c, 0x01, 0x0a, 0x10, 0x46, 0x75, 0x6e, 0x64, 0x50, - 0x73, 0x62, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x66, - 0x75, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x70, 0x73, 0x62, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x0a, 0x66, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x50, 0x73, 0x62, 0x74, 0x12, 0x2e, 0x0a, 0x13, - 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x69, 0x6e, - 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x63, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x37, 0x0a, 0x0c, - 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x75, 0x74, 0x78, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x55, - 0x74, 0x78, 0x6f, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x0b, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, - 0x55, 0x74, 0x78, 0x6f, 0x73, 0x22, 0xaf, 0x01, 0x0a, 0x0a, 0x54, 0x78, 0x54, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x12, 0x27, 0x0a, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, - 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x12, 0x3c, 0x0a, - 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, - 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x78, 0x54, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, 0x4f, - 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x7f, 0x0a, 0x0e, 0x50, 0x73, 0x62, 0x74, 0x43, - 0x6f, 0x69, 0x6e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x73, 0x62, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x70, 0x73, 0x62, 0x74, 0x12, 0x34, 0x0a, - 0x15, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x13, - 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x49, 0x6e, - 0x64, 0x65, 0x78, 0x12, 0x12, 0x0a, 0x03, 0x61, 0x64, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, - 0x48, 0x00, 0x52, 0x03, 0x61, 0x64, 0x64, 0x42, 0x0f, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x22, 0x9b, 0x01, 0x0a, 0x09, 0x55, 0x74, 0x78, - 0x6f, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2b, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, - 0x2e, 0x4f, 0x75, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6b, 0x5f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x70, 0x6b, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x32, 0x0a, 0x0f, 0x53, 0x69, 0x67, 0x6e, 0x50, 0x73, - 0x62, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x75, 0x6e, - 0x64, 0x65, 0x64, 0x5f, 0x70, 0x73, 0x62, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, - 0x66, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x50, 0x73, 0x62, 0x74, 0x22, 0x58, 0x0a, 0x10, 0x53, 0x69, - 0x67, 0x6e, 0x50, 0x73, 0x62, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, - 0x0a, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x70, 0x73, 0x62, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x73, 0x62, 0x74, 0x12, - 0x23, 0x0a, 0x0d, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x49, 0x6e, - 0x70, 0x75, 0x74, 0x73, 0x22, 0x50, 0x0a, 0x13, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, - 0x50, 0x73, 0x62, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x66, - 0x75, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x70, 0x73, 0x62, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x0a, 0x66, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x50, 0x73, 0x62, 0x74, 0x12, 0x18, 0x0a, 0x07, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x59, 0x0a, 0x14, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, - 0x7a, 0x65, 0x50, 0x73, 0x62, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, - 0x0a, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x70, 0x73, 0x62, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x73, 0x62, 0x74, 0x12, - 0x20, 0x0a, 0x0c, 0x72, 0x61, 0x77, 0x5f, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x78, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x72, 0x61, 0x77, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x54, - 0x78, 0x22, 0x13, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4d, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x65, - 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0c, - 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x75, 0x74, 0x78, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x55, - 0x74, 0x78, 0x6f, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x0b, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, - 0x55, 0x74, 0x78, 0x6f, 0x73, 0x2a, 0x8e, 0x01, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, - 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x57, 0x49, 0x54, 0x4e, 0x45, 0x53, 0x53, 0x5f, 0x50, 0x55, - 0x42, 0x4b, 0x45, 0x59, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x10, 0x01, 0x12, 0x1e, 0x0a, 0x1a, 0x4e, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, + 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, + 0x62, 0x6b, 0x65, 0x79, 0x22, 0xe4, 0x01, 0x0a, 0x14, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x70, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, + 0x79, 0x12, 0x34, 0x0a, 0x16, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x5f, + 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x14, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x46, 0x69, 0x6e, 0x67, + 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x12, 0x39, 0x0a, 0x0c, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, + 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x06, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x22, 0xaf, 0x01, 0x0a, 0x15, + 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, + 0x70, 0x63, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x12, 0x33, 0x0a, 0x16, 0x64, 0x72, 0x79, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x65, + 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x13, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x73, 0x12, 0x33, 0x0a, 0x16, 0x64, 0x72, 0x79, 0x5f, + 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, 0x64, 0x72, 0x79, 0x52, 0x75, 0x6e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x73, 0x22, 0x72, 0x0a, + 0x16, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x39, 0x0a, 0x0c, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x77, + 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, + 0x65, 0x22, 0x19, 0x0a, 0x17, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa9, 0x02, 0x0a, + 0x16, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x70, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x13, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x11, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x50, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x3b, 0x0a, 0x09, 0x66, 0x75, 0x6c, 0x6c, 0x5f, + 0x74, 0x72, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x77, 0x61, 0x6c, + 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x61, 0x70, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x46, 0x75, 0x6c, 0x6c, 0x54, 0x72, 0x65, 0x65, 0x48, 0x00, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, + 0x54, 0x72, 0x65, 0x65, 0x12, 0x4a, 0x0a, 0x0e, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x5f, + 0x72, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x77, + 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x61, 0x70, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x50, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x48, + 0x00, 0x52, 0x0d, 0x70, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x76, 0x65, 0x61, 0x6c, + 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x6f, 0x6e, + 0x6c, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0c, 0x72, 0x6f, 0x6f, 0x74, + 0x48, 0x61, 0x73, 0x68, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x24, 0x0a, 0x0d, 0x66, 0x75, 0x6c, 0x6c, + 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, + 0x00, 0x52, 0x0b, 0x66, 0x75, 0x6c, 0x6c, 0x4b, 0x65, 0x79, 0x4f, 0x6e, 0x6c, 0x79, 0x42, 0x08, + 0x0a, 0x06, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x22, 0x46, 0x0a, 0x11, 0x54, 0x61, 0x70, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x46, 0x75, 0x6c, 0x6c, 0x54, 0x72, 0x65, 0x65, 0x12, 0x31, 0x0a, + 0x0a, 0x61, 0x6c, 0x6c, 0x5f, 0x6c, 0x65, 0x61, 0x76, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x12, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x61, + 0x70, 0x4c, 0x65, 0x61, 0x66, 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x73, + 0x22, 0x44, 0x0a, 0x07, 0x54, 0x61, 0x70, 0x4c, 0x65, 0x61, 0x66, 0x12, 0x21, 0x0a, 0x0c, 0x6c, + 0x65, 0x61, 0x66, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x0b, 0x6c, 0x65, 0x61, 0x66, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, + 0x0a, 0x06, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x22, 0x83, 0x01, 0x0a, 0x16, 0x54, 0x61, 0x70, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x50, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x76, 0x65, 0x61, + 0x6c, 0x12, 0x37, 0x0a, 0x0d, 0x72, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x65, 0x64, 0x5f, 0x6c, 0x65, + 0x61, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, + 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x61, 0x70, 0x4c, 0x65, 0x61, 0x66, 0x52, 0x0c, 0x72, 0x65, + 0x76, 0x65, 0x61, 0x6c, 0x65, 0x64, 0x4c, 0x65, 0x61, 0x66, 0x12, 0x30, 0x0a, 0x14, 0x66, 0x75, + 0x6c, 0x6c, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, + 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x12, 0x66, 0x75, 0x6c, 0x6c, 0x49, 0x6e, + 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x22, 0x3c, 0x0a, 0x17, + 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x70, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x32, 0x74, 0x72, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, + 0x32, 0x74, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x3a, 0x0a, 0x0b, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x74, 0x78, 0x5f, + 0x68, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x74, 0x78, 0x48, 0x65, 0x78, + 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x36, 0x0a, 0x0f, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, + 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x73, 0x68, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0c, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x33, + 0x0a, 0x19, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x22, 0xbc, 0x01, 0x0a, 0x12, 0x53, 0x65, 0x6e, 0x64, 0x4f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x0a, 0x73, 0x61, + 0x74, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x6b, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, + 0x73, 0x61, 0x74, 0x50, 0x65, 0x72, 0x4b, 0x77, 0x12, 0x28, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x73, 0x69, 0x67, 0x6e, + 0x72, 0x70, 0x63, 0x2e, 0x54, 0x78, 0x4f, 0x75, 0x74, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6d, 0x69, 0x6e, + 0x43, 0x6f, 0x6e, 0x66, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x5f, 0x75, + 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x10, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x55, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, + 0x65, 0x64, 0x22, 0x2c, 0x0a, 0x13, 0x53, 0x65, 0x6e, 0x64, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x61, 0x77, + 0x5f, 0x74, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x72, 0x61, 0x77, 0x54, 0x78, + 0x22, 0x35, 0x0a, 0x12, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x5f, 0x74, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x63, 0x6f, 0x6e, + 0x66, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x22, 0x33, 0x0a, 0x13, 0x45, 0x73, 0x74, 0x69, 0x6d, + 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, + 0x0a, 0x0a, 0x73, 0x61, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x6b, 0x77, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x08, 0x73, 0x61, 0x74, 0x50, 0x65, 0x72, 0x4b, 0x77, 0x22, 0xfc, 0x03, 0x0a, + 0x0c, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x77, 0x65, 0x65, 0x70, 0x12, 0x2b, 0x0a, + 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0f, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, + 0x52, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x39, 0x0a, 0x0c, 0x77, 0x69, + 0x74, 0x6e, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x16, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x69, 0x74, + 0x6e, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x77, 0x69, 0x74, 0x6e, 0x65, 0x73, + 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, + 0x73, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x61, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x53, 0x61, 0x74, 0x12, 0x24, 0x0a, 0x0c, 0x73, 0x61, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x5f, + 0x62, 0x79, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0a, + 0x73, 0x61, 0x74, 0x50, 0x65, 0x72, 0x42, 0x79, 0x74, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x62, 0x72, + 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11, 0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, + 0x74, 0x41, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x6e, 0x65, 0x78, + 0x74, 0x5f, 0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x13, 0x6e, 0x65, 0x78, 0x74, 0x42, 0x72, + 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x32, 0x0a, + 0x15, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x5f, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x13, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x54, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x12, 0x37, 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x73, + 0x61, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x0d, 0x42, 0x02, 0x18, 0x01, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, + 0x53, 0x61, 0x74, 0x50, 0x65, 0x72, 0x42, 0x79, 0x74, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x73, 0x61, + 0x74, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x76, 0x62, 0x79, 0x74, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x0b, 0x73, 0x61, 0x74, 0x50, 0x65, 0x72, 0x56, 0x62, 0x79, 0x74, 0x65, 0x12, 0x35, + 0x0a, 0x17, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x61, 0x74, 0x5f, + 0x70, 0x65, 0x72, 0x5f, 0x76, 0x62, 0x79, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x14, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x53, 0x61, 0x74, 0x50, 0x65, 0x72, + 0x56, 0x62, 0x79, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0x16, 0x0a, 0x14, 0x50, + 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x77, 0x65, 0x65, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x22, 0x57, 0x0a, 0x15, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x77, + 0x65, 0x65, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0e, + 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x77, 0x65, 0x65, 0x70, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, + 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x77, 0x65, 0x65, 0x70, 0x52, 0x0d, 0x70, + 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x77, 0x65, 0x65, 0x70, 0x73, 0x22, 0xbe, 0x01, 0x0a, + 0x0e, 0x42, 0x75, 0x6d, 0x70, 0x46, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x2b, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0f, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x50, 0x6f, 0x69, + 0x6e, 0x74, 0x52, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x24, 0x0a, + 0x0c, 0x73, 0x61, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0d, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0a, 0x73, 0x61, 0x74, 0x50, 0x65, 0x72, 0x42, + 0x79, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x73, 0x61, 0x74, + 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x76, 0x62, 0x79, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0b, 0x73, 0x61, 0x74, 0x50, 0x65, 0x72, 0x56, 0x62, 0x79, 0x74, 0x65, 0x22, 0x29, 0x0a, + 0x0f, 0x42, 0x75, 0x6d, 0x70, 0x46, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x50, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, + 0x53, 0x77, 0x65, 0x65, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, + 0x07, 0x76, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, + 0x76, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x80, 0x02, 0x0a, 0x12, 0x4c, + 0x69, 0x73, 0x74, 0x53, 0x77, 0x65, 0x65, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x4c, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x48, 0x00, 0x52, 0x12, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, + 0x57, 0x0a, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, + 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, + 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x65, 0x65, 0x70, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x73, 0x48, 0x00, 0x52, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x1a, 0x39, 0x0a, 0x0e, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x73, 0x42, 0x08, 0x0a, 0x06, 0x73, 0x77, 0x65, 0x65, 0x70, 0x73, 0x22, 0x61, 0x0a, + 0x17, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x78, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x74, 0x78, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x76, 0x65, 0x72, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6f, 0x76, 0x65, 0x72, 0x77, 0x72, 0x69, 0x74, 0x65, + 0x22, 0x1a, 0x0a, 0x18, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x90, 0x03, 0x0a, + 0x0f, 0x46, 0x75, 0x6e, 0x64, 0x50, 0x73, 0x62, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x14, 0x0a, 0x04, 0x70, 0x73, 0x62, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, + 0x52, 0x04, 0x70, 0x73, 0x62, 0x74, 0x12, 0x29, 0x0a, 0x03, 0x72, 0x61, 0x77, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, + 0x54, 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x03, 0x72, 0x61, + 0x77, 0x12, 0x3c, 0x0a, 0x0b, 0x63, 0x6f, 0x69, 0x6e, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, + 0x70, 0x63, 0x2e, 0x50, 0x73, 0x62, 0x74, 0x43, 0x6f, 0x69, 0x6e, 0x53, 0x65, 0x6c, 0x65, 0x63, + 0x74, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x6f, 0x69, 0x6e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x12, + 0x21, 0x0a, 0x0b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x6f, + 0x6e, 0x66, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x61, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x76, 0x62, + 0x79, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x0b, 0x73, 0x61, 0x74, + 0x50, 0x65, 0x72, 0x56, 0x62, 0x79, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x73, 0x12, + 0x2b, 0x0a, 0x11, 0x73, 0x70, 0x65, 0x6e, 0x64, 0x5f, 0x75, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x72, 0x6d, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x73, 0x70, 0x65, 0x6e, + 0x64, 0x55, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x12, 0x3d, 0x0a, 0x0b, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x1c, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x74, + 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x66, 0x65, 0x65, 0x73, 0x22, + 0x9c, 0x01, 0x0a, 0x10, 0x46, 0x75, 0x6e, 0x64, 0x50, 0x73, 0x62, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x70, + 0x73, 0x62, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x66, 0x75, 0x6e, 0x64, 0x65, + 0x64, 0x50, 0x73, 0x62, 0x74, 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, + 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x11, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x37, 0x0a, 0x0c, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, + 0x75, 0x74, 0x78, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x77, 0x61, + 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x74, 0x78, 0x6f, 0x4c, 0x65, 0x61, 0x73, + 0x65, 0x52, 0x0b, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x55, 0x74, 0x78, 0x6f, 0x73, 0x22, 0xaf, + 0x01, 0x0a, 0x0a, 0x54, 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x27, 0x0a, + 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, + 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, + 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x12, 0x3c, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, + 0x72, 0x70, 0x63, 0x2e, 0x54, 0x78, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e, 0x4f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x6f, 0x75, 0x74, + 0x70, 0x75, 0x74, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x22, 0x7f, 0x0a, 0x0e, 0x50, 0x73, 0x62, 0x74, 0x43, 0x6f, 0x69, 0x6e, 0x53, 0x65, 0x6c, 0x65, + 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x73, 0x62, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x04, 0x70, 0x73, 0x62, 0x74, 0x12, 0x34, 0x0a, 0x15, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, + 0x6e, 0x67, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x13, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, + 0x67, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x12, 0x0a, 0x03, + 0x61, 0x64, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x03, 0x61, 0x64, 0x64, + 0x42, 0x0f, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x22, 0x9b, 0x01, 0x0a, 0x09, 0x55, 0x74, 0x78, 0x6f, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x2b, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0f, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x50, 0x6f, 0x69, + 0x6e, 0x74, 0x52, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, + 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, + 0x70, 0x6b, 0x5f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x08, 0x70, 0x6b, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, + 0x32, 0x0a, 0x0f, 0x53, 0x69, 0x67, 0x6e, 0x50, 0x73, 0x62, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x70, 0x73, 0x62, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x66, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x50, + 0x73, 0x62, 0x74, 0x22, 0x58, 0x0a, 0x10, 0x53, 0x69, 0x67, 0x6e, 0x50, 0x73, 0x62, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x65, + 0x64, 0x5f, 0x70, 0x73, 0x62, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x73, 0x69, + 0x67, 0x6e, 0x65, 0x64, 0x50, 0x73, 0x62, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x69, 0x67, 0x6e, + 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0d, 0x52, + 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x22, 0x50, 0x0a, + 0x13, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x50, 0x73, 0x62, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x70, + 0x73, 0x62, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x66, 0x75, 0x6e, 0x64, 0x65, + 0x64, 0x50, 0x73, 0x62, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, + 0x59, 0x0a, 0x14, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x50, 0x73, 0x62, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x65, + 0x64, 0x5f, 0x70, 0x73, 0x62, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x73, 0x69, + 0x67, 0x6e, 0x65, 0x64, 0x50, 0x73, 0x62, 0x74, 0x12, 0x20, 0x0a, 0x0c, 0x72, 0x61, 0x77, 0x5f, + 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, + 0x72, 0x61, 0x77, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x54, 0x78, 0x22, 0x13, 0x0a, 0x11, 0x4c, 0x69, + 0x73, 0x74, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, + 0x4d, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0c, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, + 0x75, 0x74, 0x78, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x77, 0x61, + 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x74, 0x78, 0x6f, 0x4c, 0x65, 0x61, 0x73, + 0x65, 0x52, 0x0b, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x55, 0x74, 0x78, 0x6f, 0x73, 0x2a, 0x8e, + 0x01, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, + 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x57, + 0x49, 0x54, 0x4e, 0x45, 0x53, 0x53, 0x5f, 0x50, 0x55, 0x42, 0x4b, 0x45, 0x59, 0x5f, 0x48, 0x41, + 0x53, 0x48, 0x10, 0x01, 0x12, 0x1e, 0x0a, 0x1a, 0x4e, 0x45, 0x53, 0x54, 0x45, 0x44, 0x5f, 0x57, + 0x49, 0x54, 0x4e, 0x45, 0x53, 0x53, 0x5f, 0x50, 0x55, 0x42, 0x4b, 0x45, 0x59, 0x5f, 0x48, 0x41, + 0x53, 0x48, 0x10, 0x02, 0x12, 0x25, 0x0a, 0x21, 0x48, 0x59, 0x42, 0x52, 0x49, 0x44, 0x5f, 0x4e, 0x45, 0x53, 0x54, 0x45, 0x44, 0x5f, 0x57, 0x49, 0x54, 0x4e, 0x45, 0x53, 0x53, 0x5f, 0x50, 0x55, - 0x42, 0x4b, 0x45, 0x59, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x10, 0x02, 0x12, 0x25, 0x0a, 0x21, 0x48, - 0x59, 0x42, 0x52, 0x49, 0x44, 0x5f, 0x4e, 0x45, 0x53, 0x54, 0x45, 0x44, 0x5f, 0x57, 0x49, 0x54, - 0x4e, 0x45, 0x53, 0x53, 0x5f, 0x50, 0x55, 0x42, 0x4b, 0x45, 0x59, 0x5f, 0x48, 0x41, 0x53, 0x48, - 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x50, 0x55, - 0x42, 0x4b, 0x45, 0x59, 0x10, 0x04, 0x2a, 0xfb, 0x09, 0x0a, 0x0b, 0x57, 0x69, 0x74, 0x6e, 0x65, - 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x13, 0x0a, 0x0f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, - 0x4e, 0x5f, 0x57, 0x49, 0x54, 0x4e, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x43, - 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x4c, - 0x4f, 0x43, 0x4b, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x4d, - 0x45, 0x4e, 0x54, 0x5f, 0x4e, 0x4f, 0x5f, 0x44, 0x45, 0x4c, 0x41, 0x59, 0x10, 0x02, 0x12, 0x15, - 0x0a, 0x11, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x56, - 0x4f, 0x4b, 0x45, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x4f, 0x46, - 0x46, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x56, 0x4f, 0x4b, 0x45, 0x10, 0x04, 0x12, 0x18, - 0x0a, 0x14, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x5f, - 0x52, 0x45, 0x56, 0x4f, 0x4b, 0x45, 0x10, 0x05, 0x12, 0x25, 0x0a, 0x21, 0x48, 0x54, 0x4c, 0x43, - 0x5f, 0x4f, 0x46, 0x46, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, - 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x10, 0x06, 0x12, - 0x26, 0x0a, 0x22, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, - 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x5f, - 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x10, 0x07, 0x12, 0x1f, 0x0a, 0x1b, 0x48, 0x54, 0x4c, 0x43, 0x5f, - 0x4f, 0x46, 0x46, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x54, - 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x08, 0x12, 0x20, 0x0a, 0x1c, 0x48, 0x54, 0x4c, 0x43, - 0x5f, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, - 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x09, 0x12, 0x1c, 0x0a, 0x18, 0x48, 0x54, - 0x4c, 0x43, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, - 0x52, 0x45, 0x56, 0x4f, 0x4b, 0x45, 0x10, 0x0a, 0x12, 0x14, 0x0a, 0x10, 0x57, 0x49, 0x54, 0x4e, - 0x45, 0x53, 0x53, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x10, 0x0b, 0x12, 0x1b, - 0x0a, 0x17, 0x4e, 0x45, 0x53, 0x54, 0x45, 0x44, 0x5f, 0x57, 0x49, 0x54, 0x4e, 0x45, 0x53, 0x53, - 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x10, 0x0c, 0x12, 0x15, 0x0a, 0x11, 0x43, - 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x41, 0x4e, 0x43, 0x48, 0x4f, 0x52, - 0x10, 0x0d, 0x12, 0x21, 0x0a, 0x1d, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x4d, 0x45, 0x4e, 0x54, - 0x5f, 0x4e, 0x4f, 0x5f, 0x44, 0x45, 0x4c, 0x41, 0x59, 0x5f, 0x54, 0x57, 0x45, 0x41, 0x4b, 0x4c, - 0x45, 0x53, 0x53, 0x10, 0x0e, 0x12, 0x22, 0x0a, 0x1e, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x4d, - 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x43, 0x4f, - 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x10, 0x0f, 0x12, 0x35, 0x0a, 0x31, 0x48, 0x54, 0x4c, - 0x43, 0x5f, 0x4f, 0x46, 0x46, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, - 0x54, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x49, - 0x4e, 0x50, 0x55, 0x54, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x10, 0x10, - 0x12, 0x36, 0x0a, 0x32, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, - 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, - 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x49, 0x4e, 0x50, 0x55, 0x54, 0x5f, 0x43, 0x4f, 0x4e, - 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x10, 0x11, 0x12, 0x1e, 0x0a, 0x1a, 0x4c, 0x45, 0x41, 0x53, - 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x49, 0x4d, - 0x45, 0x5f, 0x4c, 0x4f, 0x43, 0x4b, 0x10, 0x12, 0x12, 0x28, 0x0a, 0x24, 0x4c, 0x45, 0x41, 0x53, - 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x4f, 0x5f, + 0x42, 0x4b, 0x45, 0x59, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x54, + 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x50, 0x55, 0x42, 0x4b, 0x45, 0x59, 0x10, 0x04, 0x2a, + 0xfb, 0x09, 0x0a, 0x0b, 0x57, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x13, 0x0a, 0x0f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x57, 0x49, 0x54, 0x4e, 0x45, + 0x53, 0x53, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x4d, 0x45, + 0x4e, 0x54, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x4c, 0x4f, 0x43, 0x4b, 0x10, 0x01, 0x12, 0x17, + 0x0a, 0x13, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x4e, 0x4f, 0x5f, + 0x44, 0x45, 0x4c, 0x41, 0x59, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x43, 0x4f, 0x4d, 0x4d, 0x49, + 0x54, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x56, 0x4f, 0x4b, 0x45, 0x10, 0x03, 0x12, 0x17, + 0x0a, 0x13, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x4f, 0x46, 0x46, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x52, + 0x45, 0x56, 0x4f, 0x4b, 0x45, 0x10, 0x04, 0x12, 0x18, 0x0a, 0x14, 0x48, 0x54, 0x4c, 0x43, 0x5f, + 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x56, 0x4f, 0x4b, 0x45, 0x10, + 0x05, 0x12, 0x25, 0x0a, 0x21, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x4f, 0x46, 0x46, 0x45, 0x52, 0x45, + 0x44, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, + 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x10, 0x06, 0x12, 0x26, 0x0a, 0x22, 0x48, 0x54, 0x4c, 0x43, + 0x5f, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, + 0x53, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x10, 0x07, + 0x12, 0x1f, 0x0a, 0x1b, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x4f, 0x46, 0x46, 0x45, 0x52, 0x45, 0x44, + 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, + 0x08, 0x12, 0x20, 0x0a, 0x1c, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, + 0x45, 0x44, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, + 0x53, 0x10, 0x09, 0x12, 0x1c, 0x0a, 0x18, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x53, 0x45, 0x43, 0x4f, + 0x4e, 0x44, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x52, 0x45, 0x56, 0x4f, 0x4b, 0x45, 0x10, + 0x0a, 0x12, 0x14, 0x0a, 0x10, 0x57, 0x49, 0x54, 0x4e, 0x45, 0x53, 0x53, 0x5f, 0x4b, 0x45, 0x59, + 0x5f, 0x48, 0x41, 0x53, 0x48, 0x10, 0x0b, 0x12, 0x1b, 0x0a, 0x17, 0x4e, 0x45, 0x53, 0x54, 0x45, + 0x44, 0x5f, 0x57, 0x49, 0x54, 0x4e, 0x45, 0x53, 0x53, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x48, 0x41, + 0x53, 0x48, 0x10, 0x0c, 0x12, 0x15, 0x0a, 0x11, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x4d, 0x45, + 0x4e, 0x54, 0x5f, 0x41, 0x4e, 0x43, 0x48, 0x4f, 0x52, 0x10, 0x0d, 0x12, 0x21, 0x0a, 0x1d, 0x43, + 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x4e, 0x4f, 0x5f, 0x44, 0x45, 0x4c, + 0x41, 0x59, 0x5f, 0x54, 0x57, 0x45, 0x41, 0x4b, 0x4c, 0x45, 0x53, 0x53, 0x10, 0x0e, 0x12, 0x22, + 0x0a, 0x1e, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, - 0x10, 0x13, 0x12, 0x2b, 0x0a, 0x27, 0x4c, 0x45, 0x41, 0x53, 0x45, 0x5f, 0x48, 0x54, 0x4c, 0x43, - 0x5f, 0x4f, 0x46, 0x46, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, - 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x10, 0x14, 0x12, - 0x2c, 0x0a, 0x28, 0x4c, 0x45, 0x41, 0x53, 0x45, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, 0x43, - 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x53, - 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x10, 0x15, 0x12, 0x19, 0x0a, - 0x15, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x50, 0x55, 0x42, 0x5f, 0x4b, 0x45, 0x59, - 0x5f, 0x53, 0x50, 0x45, 0x4e, 0x44, 0x10, 0x16, 0x12, 0x1e, 0x0a, 0x1a, 0x54, 0x41, 0x50, 0x52, - 0x4f, 0x4f, 0x54, 0x5f, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, - 0x5f, 0x53, 0x50, 0x45, 0x4e, 0x44, 0x10, 0x17, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x41, 0x50, 0x52, - 0x4f, 0x4f, 0x54, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, - 0x54, 0x5f, 0x53, 0x50, 0x45, 0x4e, 0x44, 0x10, 0x18, 0x12, 0x1e, 0x0a, 0x1a, 0x54, 0x41, 0x50, - 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x41, 0x4e, 0x43, 0x48, 0x4f, 0x52, 0x5f, 0x53, 0x57, 0x45, 0x45, - 0x50, 0x5f, 0x53, 0x50, 0x45, 0x4e, 0x44, 0x10, 0x19, 0x12, 0x2d, 0x0a, 0x29, 0x54, 0x41, 0x50, - 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x4f, 0x46, 0x46, 0x45, 0x52, 0x45, + 0x10, 0x0f, 0x12, 0x35, 0x0a, 0x31, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x4f, 0x46, 0x46, 0x45, 0x52, + 0x45, 0x44, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, + 0x44, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x49, 0x4e, 0x50, 0x55, 0x54, 0x5f, 0x43, 0x4f, + 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x10, 0x10, 0x12, 0x36, 0x0a, 0x32, 0x48, 0x54, 0x4c, + 0x43, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, + 0x53, 0x53, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, + 0x49, 0x4e, 0x50, 0x55, 0x54, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x10, + 0x11, 0x12, 0x1e, 0x0a, 0x1a, 0x4c, 0x45, 0x41, 0x53, 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, + 0x54, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x4c, 0x4f, 0x43, 0x4b, 0x10, + 0x12, 0x12, 0x28, 0x0a, 0x24, 0x4c, 0x45, 0x41, 0x53, 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, + 0x54, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, + 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x10, 0x13, 0x12, 0x2b, 0x0a, 0x27, 0x4c, + 0x45, 0x41, 0x53, 0x45, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x4f, 0x46, 0x46, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, - 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x10, 0x1a, 0x12, 0x2e, 0x0a, 0x2a, 0x54, 0x41, 0x50, 0x52, - 0x4f, 0x4f, 0x54, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, - 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, - 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x10, 0x1b, 0x12, 0x24, 0x0a, 0x20, 0x54, 0x41, 0x50, 0x52, - 0x4f, 0x4f, 0x54, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x5f, - 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x52, 0x45, 0x56, 0x4f, 0x4b, 0x45, 0x10, 0x1c, 0x12, 0x20, - 0x0a, 0x1c, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, - 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x56, 0x4f, 0x4b, 0x45, 0x10, 0x1d, - 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x48, 0x54, 0x4c, 0x43, - 0x5f, 0x4f, 0x46, 0x46, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x56, 0x4f, 0x4b, 0x45, 0x10, - 0x1e, 0x12, 0x27, 0x0a, 0x23, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x48, 0x54, 0x4c, - 0x43, 0x5f, 0x4f, 0x46, 0x46, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, - 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x1f, 0x12, 0x26, 0x0a, 0x22, 0x54, 0x41, - 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x4c, 0x4f, 0x43, 0x41, 0x4c, - 0x5f, 0x4f, 0x46, 0x46, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, - 0x10, 0x20, 0x12, 0x28, 0x0a, 0x24, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x48, 0x54, - 0x4c, 0x43, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x4d, 0x4f, - 0x54, 0x45, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x21, 0x12, 0x27, 0x0a, 0x23, - 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, 0x43, 0x43, - 0x45, 0x50, 0x54, 0x45, 0x44, 0x5f, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x5f, 0x53, 0x55, 0x43, 0x43, - 0x45, 0x53, 0x53, 0x10, 0x22, 0x12, 0x1d, 0x0a, 0x19, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, - 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x56, 0x4f, - 0x4b, 0x45, 0x10, 0x23, 0x2a, 0x56, 0x0a, 0x11, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x1f, 0x43, 0x48, 0x41, - 0x4e, 0x47, 0x45, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1c, - 0x0a, 0x18, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x32, 0x54, 0x52, 0x10, 0x01, 0x32, 0xf6, 0x10, 0x0a, - 0x09, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x4b, 0x69, 0x74, 0x12, 0x4c, 0x0a, 0x0b, 0x4c, 0x69, - 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x2e, 0x77, 0x61, 0x6c, 0x6c, - 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, - 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0b, 0x4c, 0x65, 0x61, 0x73, - 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1d, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, - 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, - 0x70, 0x63, 0x2e, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x0d, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, - 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1f, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, - 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, - 0x74, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x4f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x4c, 0x69, - 0x73, 0x74, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, - 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, - 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x0d, 0x44, 0x65, 0x72, 0x69, 0x76, 0x65, 0x4e, - 0x65, 0x78, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x11, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, - 0x70, 0x63, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x73, 0x69, 0x67, 0x6e, - 0x72, 0x70, 0x63, 0x2e, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, - 0x72, 0x12, 0x38, 0x0a, 0x09, 0x44, 0x65, 0x72, 0x69, 0x76, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x13, - 0x2e, 0x73, 0x69, 0x67, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4b, 0x65, 0x79, 0x4c, 0x6f, 0x63, 0x61, - 0x74, 0x6f, 0x72, 0x1a, 0x16, 0x2e, 0x73, 0x69, 0x67, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4b, 0x65, - 0x79, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x3b, 0x0a, 0x08, 0x4e, - 0x65, 0x78, 0x74, 0x41, 0x64, 0x64, 0x72, 0x12, 0x16, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, - 0x72, 0x70, 0x63, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x17, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x64, 0x64, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x77, 0x61, 0x6c, - 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6c, - 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x4f, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, - 0x12, 0x1e, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1f, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x58, 0x0a, 0x0f, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x12, 0x21, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, - 0x2e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, - 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x0d, 0x4c, - 0x69, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x77, - 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, - 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x64, 0x0a, 0x13, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, - 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x12, 0x25, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, + 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x10, 0x14, 0x12, 0x2c, 0x0a, 0x28, 0x4c, 0x45, 0x41, 0x53, + 0x45, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x5f, + 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x5f, 0x4c, + 0x45, 0x56, 0x45, 0x4c, 0x10, 0x15, 0x12, 0x19, 0x0a, 0x15, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, + 0x54, 0x5f, 0x50, 0x55, 0x42, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x53, 0x50, 0x45, 0x4e, 0x44, 0x10, + 0x16, 0x12, 0x1e, 0x0a, 0x1a, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x4c, 0x4f, 0x43, + 0x41, 0x4c, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x5f, 0x53, 0x50, 0x45, 0x4e, 0x44, 0x10, + 0x17, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x52, 0x45, 0x4d, + 0x4f, 0x54, 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x5f, 0x53, 0x50, 0x45, 0x4e, 0x44, + 0x10, 0x18, 0x12, 0x1e, 0x0a, 0x1a, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x41, 0x4e, + 0x43, 0x48, 0x4f, 0x52, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, 0x5f, 0x53, 0x50, 0x45, 0x4e, 0x44, + 0x10, 0x19, 0x12, 0x2d, 0x0a, 0x29, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x48, 0x54, + 0x4c, 0x43, 0x5f, 0x4f, 0x46, 0x46, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, + 0x55, 0x54, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x10, + 0x1a, 0x12, 0x2e, 0x0a, 0x2a, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x48, 0x54, 0x4c, + 0x43, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, + 0x53, 0x53, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x10, + 0x1b, 0x12, 0x24, 0x0a, 0x20, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x48, 0x54, 0x4c, + 0x43, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x52, + 0x45, 0x56, 0x4f, 0x4b, 0x45, 0x10, 0x1c, 0x12, 0x20, 0x0a, 0x1c, 0x54, 0x41, 0x50, 0x52, 0x4f, + 0x4f, 0x54, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, + 0x5f, 0x52, 0x45, 0x56, 0x4f, 0x4b, 0x45, 0x10, 0x1d, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x41, 0x50, + 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x4f, 0x46, 0x46, 0x45, 0x52, 0x45, + 0x44, 0x5f, 0x52, 0x45, 0x56, 0x4f, 0x4b, 0x45, 0x10, 0x1e, 0x12, 0x27, 0x0a, 0x23, 0x54, 0x41, + 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x4f, 0x46, 0x46, 0x45, 0x52, + 0x45, 0x44, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, + 0x54, 0x10, 0x1f, 0x12, 0x26, 0x0a, 0x22, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x48, + 0x54, 0x4c, 0x43, 0x5f, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x5f, 0x4f, 0x46, 0x46, 0x45, 0x52, 0x45, + 0x44, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x20, 0x12, 0x28, 0x0a, 0x24, 0x54, + 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, 0x43, 0x43, 0x45, + 0x50, 0x54, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x54, 0x45, 0x5f, 0x53, 0x55, 0x43, 0x43, + 0x45, 0x53, 0x53, 0x10, 0x21, 0x12, 0x27, 0x0a, 0x23, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, + 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x5f, 0x4c, + 0x4f, 0x43, 0x41, 0x4c, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x22, 0x12, 0x1d, + 0x0a, 0x19, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, + 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x56, 0x4f, 0x4b, 0x45, 0x10, 0x23, 0x2a, 0x56, 0x0a, + 0x11, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x23, 0x0a, 0x1f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x41, 0x44, 0x44, + 0x52, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x43, 0x48, 0x41, 0x4e, 0x47, + 0x45, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, + 0x32, 0x54, 0x52, 0x10, 0x01, 0x32, 0xf6, 0x10, 0x0a, 0x09, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, + 0x4b, 0x69, 0x74, 0x12, 0x4c, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, + 0x6e, 0x74, 0x12, 0x1d, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1e, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x4c, 0x0a, 0x0b, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x12, 0x1d, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x65, 0x61, + 0x73, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1e, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x65, 0x61, 0x73, + 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x52, 0x0a, 0x0d, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x12, 0x1f, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x6c, + 0x65, 0x61, 0x73, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x20, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, + 0x6c, 0x65, 0x61, 0x73, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x65, 0x61, 0x73, 0x65, + 0x73, 0x12, 0x1c, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1d, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x4c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, + 0x0a, 0x0d, 0x44, 0x65, 0x72, 0x69, 0x76, 0x65, 0x4e, 0x65, 0x78, 0x74, 0x4b, 0x65, 0x79, 0x12, + 0x11, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4b, 0x65, 0x79, 0x52, + 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x73, 0x69, 0x67, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4b, 0x65, 0x79, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x38, 0x0a, 0x09, 0x44, 0x65, + 0x72, 0x69, 0x76, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x13, 0x2e, 0x73, 0x69, 0x67, 0x6e, 0x72, 0x70, + 0x63, 0x2e, 0x4b, 0x65, 0x79, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x16, 0x2e, 0x73, + 0x69, 0x67, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x4b, 0x65, 0x79, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x6f, 0x72, 0x12, 0x3b, 0x0a, 0x08, 0x4e, 0x65, 0x78, 0x74, 0x41, 0x64, 0x64, 0x72, + 0x12, 0x16, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x64, 0x64, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, + 0x74, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x46, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, + 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4f, 0x0a, 0x0c, 0x4c, 0x69, 0x73, + 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x1e, 0x2e, 0x77, 0x61, 0x6c, 0x6c, + 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x77, 0x61, 0x6c, 0x6c, + 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x0f, 0x52, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x12, 0x21, 0x2e, + 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, + 0x65, 0x64, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x22, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x71, + 0x75, 0x69, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, + 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, + 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x13, 0x53, 0x69, 0x67, 0x6e, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x12, + 0x25, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x69, 0x67, 0x6e, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, - 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, - 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x15, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x12, 0x27, - 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, - 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, + 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a, + 0x0a, 0x15, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x57, + 0x69, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x12, 0x27, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x57, 0x69, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x52, 0x0a, 0x0d, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x12, 0x1f, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x49, - 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, - 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x0f, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x50, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x21, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, - 0x74, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, - 0x63, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x77, 0x61, - 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x75, - 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x58, 0x0a, 0x0f, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x70, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x12, 0x21, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x49, - 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x70, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, - 0x63, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, 0x70, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x12, 0x50, 0x75, 0x62, - 0x6c, 0x69, 0x73, 0x68, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x16, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x1a, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, - 0x72, 0x70, 0x63, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x11, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, - 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x77, 0x61, 0x6c, - 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x4c, 0x0a, 0x0b, 0x53, 0x65, 0x6e, 0x64, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x12, - 0x1d, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x6e, 0x64, - 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, - 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4f, - 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, - 0x0a, 0x0b, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x12, 0x1d, 0x2e, - 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, - 0x74, 0x65, 0x46, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x77, - 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, - 0x65, 0x46, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x0d, - 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x77, 0x65, 0x65, 0x70, 0x73, 0x12, 0x1f, 0x2e, - 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x53, 0x77, 0x65, 0x65, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, - 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x53, 0x77, 0x65, 0x65, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x40, 0x0a, 0x07, 0x42, 0x75, 0x6d, 0x70, 0x46, 0x65, 0x65, 0x12, 0x19, 0x2e, 0x77, 0x61, - 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x75, 0x6d, 0x70, 0x46, 0x65, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, - 0x70, 0x63, 0x2e, 0x42, 0x75, 0x6d, 0x70, 0x46, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x65, 0x65, 0x70, 0x73, - 0x12, 0x1c, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x53, 0x77, 0x65, 0x65, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, - 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, - 0x77, 0x65, 0x65, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, - 0x10, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x22, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x61, - 0x62, 0x65, 0x6c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, - 0x63, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x08, 0x46, 0x75, - 0x6e, 0x64, 0x50, 0x73, 0x62, 0x74, 0x12, 0x1a, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, - 0x70, 0x63, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x50, 0x73, 0x62, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x46, - 0x75, 0x6e, 0x64, 0x50, 0x73, 0x62, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x43, 0x0a, 0x08, 0x53, 0x69, 0x67, 0x6e, 0x50, 0x73, 0x62, 0x74, 0x12, 0x1a, 0x2e, 0x77, 0x61, - 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x50, 0x73, 0x62, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, - 0x72, 0x70, 0x63, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x50, 0x73, 0x62, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x0c, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, - 0x50, 0x73, 0x62, 0x74, 0x12, 0x1e, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, - 0x2e, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x50, 0x73, 0x62, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, - 0x2e, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x50, 0x73, 0x62, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x6c, 0x6e, 0x64, 0x2f, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2f, 0x77, - 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x57, 0x69, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x28, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x56, 0x65, 0x72, + 0x69, 0x66, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x41, 0x64, + 0x64, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x0d, 0x49, 0x6d, + 0x70, 0x6f, 0x72, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1f, 0x2e, 0x77, 0x61, + 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x77, + 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, + 0x0a, 0x0f, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, + 0x79, 0x12, 0x21, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6d, + 0x70, 0x6f, 0x72, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, + 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x0f, 0x49, 0x6d, 0x70, 0x6f, + 0x72, 0x74, 0x54, 0x61, 0x70, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x12, 0x21, 0x2e, 0x77, 0x61, + 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x61, + 0x70, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, + 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, + 0x74, 0x54, 0x61, 0x70, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x48, 0x0a, 0x12, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, + 0x74, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x1a, 0x1a, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x75, 0x62, + 0x6c, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x11, + 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x20, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, + 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, + 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0b, 0x53, 0x65, 0x6e, + 0x64, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x12, 0x1d, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, + 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, + 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0b, 0x45, 0x73, 0x74, 0x69, 0x6d, + 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x12, 0x1d, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, + 0x70, 0x63, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, + 0x63, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x0d, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x53, 0x77, 0x65, 0x65, 0x70, 0x73, 0x12, 0x1f, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, + 0x70, 0x63, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x77, 0x65, 0x65, 0x70, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, + 0x72, 0x70, 0x63, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x77, 0x65, 0x65, 0x70, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x07, 0x42, 0x75, 0x6d, + 0x70, 0x46, 0x65, 0x65, 0x12, 0x19, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, + 0x2e, 0x42, 0x75, 0x6d, 0x70, 0x46, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1a, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x75, 0x6d, 0x70, + 0x46, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x4c, + 0x69, 0x73, 0x74, 0x53, 0x77, 0x65, 0x65, 0x70, 0x73, 0x12, 0x1c, 0x2e, 0x77, 0x61, 0x6c, 0x6c, + 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x65, 0x65, 0x70, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, + 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x65, 0x65, 0x70, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x10, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x77, 0x61, 0x6c, + 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, + 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x08, 0x46, 0x75, 0x6e, 0x64, 0x50, 0x73, 0x62, 0x74, 0x12, + 0x1a, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x75, 0x6e, 0x64, + 0x50, 0x73, 0x62, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x77, 0x61, + 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x75, 0x6e, 0x64, 0x50, 0x73, 0x62, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x08, 0x53, 0x69, 0x67, 0x6e, + 0x50, 0x73, 0x62, 0x74, 0x12, 0x1a, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, + 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x50, 0x73, 0x62, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1b, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x69, 0x67, + 0x6e, 0x50, 0x73, 0x62, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, + 0x0c, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x50, 0x73, 0x62, 0x74, 0x12, 0x1e, 0x2e, + 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, + 0x7a, 0x65, 0x50, 0x73, 0x62, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, + 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, + 0x7a, 0x65, 0x50, 0x73, 0x62, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x31, + 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x67, + 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x6c, 0x6e, + 0x64, 0x2f, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x72, 0x70, + 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/lnrpc/walletrpc/walletkit.proto b/lnrpc/walletrpc/walletkit.proto index b029f3afb5..a09fd59472 100644 --- a/lnrpc/walletrpc/walletkit.proto +++ b/lnrpc/walletrpc/walletkit.proto @@ -517,6 +517,13 @@ message AddressProperty { // The balance of the address. int64 balance = 3; + + // The full derivation path of the address. This will be empty for imported + // addresses. + string derivation_path = 4; + + // The public key of the address. This will be empty for imported addresses. + bytes public_key = 5; } message AccountWithAddresses { diff --git a/lnrpc/walletrpc/walletkit.swagger.json b/lnrpc/walletrpc/walletkit.swagger.json index 811c18dc70..a91362f855 100644 --- a/lnrpc/walletrpc/walletkit.swagger.json +++ b/lnrpc/walletrpc/walletkit.swagger.json @@ -1317,6 +1317,15 @@ "type": "string", "format": "int64", "description": "The balance of the address." + }, + "derivation_path": { + "type": "string", + "description": "The full derivation path of the address. This will be empty for imported\naddresses." + }, + "public_key": { + "type": "string", + "format": "byte", + "description": "The public key of the address. This will be empty for imported addresses." } } }, diff --git a/lnrpc/walletrpc/walletkit_server.go b/lnrpc/walletrpc/walletkit_server.go index 799ed3d9a5..f005a8bffc 100644 --- a/lnrpc/walletrpc/walletkit_server.go +++ b/lnrpc/walletrpc/walletkit_server.go @@ -2054,10 +2054,16 @@ func marshalWalletAddressList(w *WalletKit, account *waddrmgr.AccountProperties, addresses := make([]*AddressProperty, len(addressList)) for idx, addr := range addressList { + var pubKeyBytes []byte + if addr.PublicKey != nil { + pubKeyBytes = addr.PublicKey.SerializeCompressed() + } addresses[idx] = &AddressProperty{ - Address: addr.Address, - IsInternal: addr.Internal, - Balance: int64(addr.Balance), + Address: addr.Address, + IsInternal: addr.Internal, + Balance: int64(addr.Balance), + DerivationPath: addr.DerivationPath, + PublicKey: pubKeyBytes, } } diff --git a/lnwallet/btcwallet/btcwallet.go b/lnwallet/btcwallet/btcwallet.go index 93f909072a..364953be47 100644 --- a/lnwallet/btcwallet/btcwallet.go +++ b/lnwallet/btcwallet/btcwallet.go @@ -815,17 +815,35 @@ func (b *BtcWallet) ListAddresses(name string, // Hex-encode the compressed public key for custom lnd // keys, addresses don't make a lot of sense. - pubKey, ok := managedAddr.(waddrmgr.ManagedPubKeyAddress) - if ok && isLndCustom { + var ( + pubKey *btcec.PublicKey + derivationPath string + ) + pka, ok := managedAddr.(waddrmgr.ManagedPubKeyAddress) + if ok { + pubKey = pka.PubKey() + + // There can be an error in two cases: Either + // the address isn't a managed pubkey address, + // which we already checked above, or the + // address is imported in which case we don't + // know the derivation path, and it will just be + // empty anyway. + _, _, derivationPath, _ = + Bip32DerivationFromAddress(pka) + } + if pubKey != nil && isLndCustom { addressString = hex.EncodeToString( - pubKey.PubKey().SerializeCompressed(), + pubKey.SerializeCompressed(), ) } addressProperties[idx] = lnwallet.AddressProperty{ - Address: addressString, - Internal: managedAddr.Internal(), - Balance: addressBalance[addressString], + Address: addressString, + Internal: managedAddr.Internal(), + Balance: addressBalance[addressString], + PublicKey: pubKey, + DerivationPath: derivationPath, } } diff --git a/lnwallet/interface.go b/lnwallet/interface.go index da7630e319..3df0a7328f 100644 --- a/lnwallet/interface.go +++ b/lnwallet/interface.go @@ -96,6 +96,12 @@ type AddressProperty struct { // Balance returns the total balance of an address. Balance btcutil.Amount + + // DerivationPath is the derivation path of the address. + DerivationPath string + + // PublicKey is the public key of the address. + PublicKey *btcec.PublicKey } // AccountIdentifier contains information to uniquely identify an account. From f333581d6cab5f879378d0b4f6580fda6495e742 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Tue, 6 Feb 2024 12:26:00 +0100 Subject: [PATCH 15/17] cmd/lncli: add 'wallet psbt fundtemplate' command This commit adds a new sub command to the wallet that allows using the new funding option from a template. Creating a new command is way easier for the user to understand than adding multiple flags that are only valid in certain combinations. --- cmd/lncli/main.go | 25 +++ cmd/lncli/walletrpc_active.go | 356 +++++++++++++++++++++++++++++++++- 2 files changed, 378 insertions(+), 3 deletions(-) diff --git a/cmd/lncli/main.go b/cmd/lncli/main.go index deadbecdd0..bd58344032 100644 --- a/cmd/lncli/main.go +++ b/cmd/lncli/main.go @@ -15,6 +15,7 @@ import ( "syscall" "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/chaincfg" "github.com/lightningnetwork/lnd" "github.com/lightningnetwork/lnd/build" "github.com/lightningnetwork/lnd/lncfg" @@ -537,3 +538,27 @@ func readPassword(text string) ([]byte, error) { fmt.Println() return pw, err } + +// networkParams parses the global network flag into a chaincfg.Params. +func networkParams(ctx *cli.Context) (*chaincfg.Params, error) { + network := strings.ToLower(ctx.GlobalString("network")) + switch network { + case "mainnet": + return &chaincfg.MainNetParams, nil + + case "testnet": + return &chaincfg.TestNet3Params, nil + + case "regtest": + return &chaincfg.RegressionNetParams, nil + + case "simnet": + return &chaincfg.SimNetParams, nil + + case "signet": + return &chaincfg.SigNetParams, nil + + default: + return nil, fmt.Errorf("unknown network: %v", network) + } +} diff --git a/cmd/lncli/walletrpc_active.go b/cmd/lncli/walletrpc_active.go index 8ccb0bfdec..3c210d0f0e 100644 --- a/cmd/lncli/walletrpc_active.go +++ b/cmd/lncli/walletrpc_active.go @@ -12,8 +12,13 @@ import ( "errors" "fmt" "sort" + "strconv" + "strings" + "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/psbt" "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcd/wire" "github.com/lightningnetwork/lnd/lnrpc" "github.com/lightningnetwork/lnd/lnrpc/walletrpc" @@ -29,6 +34,7 @@ var ( "(PSBTs).", Subcommands: []cli.Command{ fundPsbtCommand, + fundTemplatePsbtCommand, finalizePsbtCommand, }, } @@ -56,6 +62,8 @@ var ( verifyMessageWithAddrCommand, }, } + + p2TrChangeType = walletrpc.ChangeAddressType_CHANGE_ADDRESS_TYPE_P2TR ) // walletCommands will return the set of commands to enable for walletrpc @@ -726,6 +734,349 @@ type fundPsbtResponse struct { Locks []*utxoLease `json:"locks"` } +var fundTemplatePsbtCommand = cli.Command{ + Name: "fundtemplate", + Usage: "Fund a Partially Signed Bitcoin Transaction (PSBT) from a " + + "template.", + ArgsUsage: "[--template_psbt=T | [--outputs=O [--inputs=I]]] " + + "[--conf_target=C | --sat_per_vbyte=S] " + + "[--change_type=A] [--change_output_index=I]", + Description: ` + The fund command creates a fully populated PSBT that contains enough + inputs to fund the outputs specified in either the template. + + The main difference to the 'fund' command is that the template PSBT + is allowed to already contain both inputs and outputs and coin selection + and fee estimation is still performed. + + If '--inputs' and '--outputs' are provided instead of a template, then + those are used to create a new PSBT template. + + The 'outputs' flag decodes addresses and the amount to send respectively + in the following JSON format: + + --outputs='["ExampleAddr:NumCoinsInSatoshis", "SecondAddr:Sats"]' + + The 'outputs' format is different from the 'fund' command as the order + is important for being able to specify the change output index, so an + array is used rather than a map. + + The optional 'inputs' flag decodes a JSON list of UTXO outpoints as + returned by the listunspent command for example: + + --inputs='[":",":",...] + + Any inputs specified that belong to this lnd node MUST be locked/leased + (by using 'lncli wallet leaseoutput') manually to make sure they aren't + selected again by the coin selection algorithm. + + After verifying and possibly adding new inputs, all input UTXOs added by + the command are locked with an internal app ID. Inputs already present + in the template are NOT locked, as they must already be locked when + invoking the command. + + The '--change_output_index' flag can be used to specify the index of the + output in the PSBT that should be used as the change output. If '-1' is + specified, the wallet will automatically add a change output if one is + required! + + The optional '--change-type' flag permits to choose the address type + for the change for default accounts and single imported public keys. + The custom address type can only be p2tr at the moment (p2wkh will be + used by default). No custom address type should be provided for custom + accounts as we will always generate the change address using the coin + selection key scope. + `, + Flags: []cli.Flag{ + cli.StringFlag{ + Name: "template_psbt", + Usage: "the outputs to fund and optional inputs to " + + "spend provided in the base64 PSBT format", + }, + cli.StringFlag{ + Name: "outputs", + Usage: "a JSON compatible map of destination " + + "addresses to amounts to send, must not " + + "include a change address as that will be " + + "added automatically by the wallet", + }, + cli.StringFlag{ + Name: "inputs", + Usage: "an optional JSON compatible list of UTXO " + + "outpoints to use as the PSBT's inputs", + }, + cli.Uint64Flag{ + Name: "conf_target", + Usage: "the number of blocks that the transaction " + + "should be confirmed on-chain within", + Value: 6, + }, + cli.Uint64Flag{ + Name: "sat_per_vbyte", + Usage: "a manual fee expressed in sat/vbyte that " + + "should be used when creating the transaction", + }, + cli.StringFlag{ + Name: "account", + Usage: "(optional) the name of the account to use to " + + "create/fund the PSBT", + }, + cli.StringFlag{ + Name: "change_type", + Usage: "(optional) the type of the change address to " + + "use to create/fund the PSBT. If no address " + + "type is provided, p2wpkh will be used for " + + "default accounts and single imported public " + + "keys. No custom address type should be " + + "provided for custom accounts as we will " + + "always use the coin selection key scope to " + + "generate the change address", + }, + cli.Uint64Flag{ + Name: "min_confs", + Usage: "(optional) the minimum number of " + + "confirmations each input used for the PSBT " + + "transaction must satisfy", + Value: defaultUtxoMinConf, + }, + cli.IntFlag{ + Name: "change_output_index", + Usage: "(optional) define an existing output in the " + + "PSBT template that should be used as the " + + "change output. The value of -1 means a " + + "change output will be added automatically " + + "if required", + Value: -1, + }, + }, + Action: actionDecorator(fundTemplatePsbt), +} + +// fundTemplatePsbt implements the fundtemplate sub command. +// +//nolint:funlen +func fundTemplatePsbt(ctx *cli.Context) error { + ctxc := getContext() + + // Display the command's help message if there aren't any flags + // specified. + if ctx.NumFlags() == 0 { + return cli.ShowCommandHelp(ctx, "fund") + } + + chainParams, err := networkParams(ctx) + if err != nil { + return err + } + + coinSelect := &walletrpc.PsbtCoinSelect{} + + // Parse template flags. + switch { + // The PSBT flag is mutually exclusive with the outputs/inputs flags. + case ctx.IsSet("template_psbt") && + (ctx.IsSet("inputs") || ctx.IsSet("outputs")): + + return fmt.Errorf("cannot set template_psbt and inputs/" + + "outputs flags at the same time") + + // Use a pre-existing PSBT as the transaction template. + case len(ctx.String("template_psbt")) > 0: + psbtBase64 := ctx.String("template_psbt") + psbtBytes, err := base64.StdEncoding.DecodeString(psbtBase64) + if err != nil { + return err + } + + coinSelect.Psbt = psbtBytes + + // The user manually specified outputs and/or inputs in JSON + // format. + case len(ctx.String("outputs")) > 0 || len(ctx.String("inputs")) > 0: + var ( + inputs []*wire.OutPoint + outputs []*wire.TxOut + ) + + if len(ctx.String("outputs")) > 0 { + var outputStrings []string + + // Parse the address to amount map as JSON now. At least + // one entry must be present. + jsonMap := []byte(ctx.String("outputs")) + err := json.Unmarshal(jsonMap, &outputStrings) + if err != nil { + return fmt.Errorf("error parsing outputs "+ + "JSON: %w", err) + } + + // Parse the addresses and amounts into a slice of + // transaction outputs. + for idx, addrAndAmount := range outputStrings { + parts := strings.Split(addrAndAmount, ":") + if len(parts) != 2 { + return fmt.Errorf("invalid output "+ + "format at index %d", idx) + } + + addrStr, amountStr := parts[0], parts[1] + amount, err := strconv.ParseInt( + amountStr, 10, 64, + ) + if err != nil { + return fmt.Errorf("error parsing "+ + "amount at index %d: %w", idx, + err) + } + + addr, err := btcutil.DecodeAddress( + addrStr, chainParams, + ) + if err != nil { + return fmt.Errorf("error parsing "+ + "address at index %d: %w", idx, + err) + } + + pkScript, err := txscript.PayToAddrScript(addr) + if err != nil { + return fmt.Errorf("error creating pk "+ + "script for address at index "+ + "%d: %w", idx, err) + } + + outputs = append(outputs, &wire.TxOut{ + PkScript: pkScript, + Value: amount, + }) + } + } + + // Inputs are optional. + if len(ctx.String("inputs")) > 0 { + var inputStrings []string + + jsonList := []byte(ctx.String("inputs")) + err := json.Unmarshal(jsonList, &inputStrings) + if err != nil { + return fmt.Errorf("error parsing inputs JSON: "+ + "%w", err) + } + + for idx, input := range inputStrings { + op, err := wire.NewOutPointFromString(input) + if err != nil { + return fmt.Errorf("error parsing "+ + "UTXO outpoint %d: %w", idx, + err) + } + inputs = append(inputs, op) + } + } + + packet, err := psbt.New( + inputs, outputs, 2, 0, make([]uint32, len(inputs)), + ) + if err != nil { + return fmt.Errorf("error creating template PSBT: %w", + err) + } + + var buf bytes.Buffer + err = packet.Serialize(&buf) + if err != nil { + return fmt.Errorf("error serializing template PSBT: %w", + err) + } + + coinSelect.Psbt = buf.Bytes() + + default: + return fmt.Errorf("must specify either template_psbt or " + + "inputs/outputs flag") + } + + minConfs := int32(ctx.Uint64("min_confs")) + req := &walletrpc.FundPsbtRequest{ + Account: ctx.String("account"), + MinConfs: minConfs, + SpendUnconfirmed: minConfs == 0, + Template: &walletrpc.FundPsbtRequest_CoinSelect{ + CoinSelect: coinSelect, + }, + } + + // Parse fee flags. + switch { + case ctx.IsSet("conf_target") && ctx.IsSet("sat_per_vbyte"): + return fmt.Errorf("cannot set conf_target and sat_per_vbyte " + + "at the same time") + + case ctx.Uint64("sat_per_vbyte") > 0: + req.Fees = &walletrpc.FundPsbtRequest_SatPerVbyte{ + SatPerVbyte: ctx.Uint64("sat_per_vbyte"), + } + + // Check conf_target last because it has a default value. + case ctx.Uint64("conf_target") > 0: + req.Fees = &walletrpc.FundPsbtRequest_TargetConf{ + TargetConf: uint32(ctx.Uint64("conf_target")), + } + } + + type existingIndex = walletrpc.PsbtCoinSelect_ExistingOutputIndex + + // Parse change type flag. + changeOutputIndex := ctx.Int("change_output_index") + switch { + case changeOutputIndex == -1: + coinSelect.ChangeOutput = &walletrpc.PsbtCoinSelect_Add{ + Add: true, + } + case changeOutputIndex >= 0: + coinSelect.ChangeOutput = &existingIndex{ + ExistingOutputIndex: int32(changeOutputIndex), + } + + default: + return fmt.Errorf("invalid change_output_index: %d", + changeOutputIndex) + } + + if ctx.IsSet("change_type") { + switch addressType := ctx.String("change_type"); addressType { + case "p2tr": + req.ChangeType = p2TrChangeType + + default: + return fmt.Errorf("invalid type for the change type: "+ + "%s. At the moment, the only address type "+ + "supported is p2tr (default to p2wkh)", + addressType) + } + } + + walletClient, cleanUp := getWalletClient(ctx) + defer cleanUp() + + response, err := walletClient.FundPsbt(ctxc, req) + if err != nil { + return err + } + + jsonLocks := marshallLocks(response.LockedUtxos) + + printJSON(&fundPsbtResponse{ + Psbt: base64.StdEncoding.EncodeToString( + response.FundedPsbt, + ), + ChangeOutputIndex: response.ChangeOutputIndex, + Locks: jsonLocks, + }) + + return nil +} + var fundPsbtCommand = cli.Command{ Name: "fund", Usage: "Fund a Partially Signed Bitcoin Transaction (PSBT).", @@ -837,7 +1188,7 @@ func fundPsbt(ctx *cli.Context) error { // Parse template flags. switch { - // The PSBT flag is mutally exclusive with the outputs/inputs flags. + // The PSBT flag is mutually exclusive with the outputs/inputs flags. case ctx.IsSet("template_psbt") && (ctx.IsSet("inputs") || ctx.IsSet("outputs")): @@ -926,8 +1277,7 @@ func fundPsbt(ctx *cli.Context) error { if ctx.IsSet("change_type") { switch addressType := ctx.String("change_type"); addressType { case "p2tr": - //nolint:lll - req.ChangeType = walletrpc.ChangeAddressType_CHANGE_ADDRESS_TYPE_P2TR + req.ChangeType = p2TrChangeType default: return fmt.Errorf("invalid type for the "+ From 6dea39c23a4e2c116811c07d50b862829a31b3c8 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Tue, 6 Feb 2024 12:26:01 +0100 Subject: [PATCH 16/17] itest: add new test for FundPsbt with coin selection --- itest/list_on_test.go | 4 + itest/lnd_psbt_test.go | 324 +++++++++++++++++++++++++++++++++++------ 2 files changed, 281 insertions(+), 47 deletions(-) diff --git a/itest/list_on_test.go b/itest/list_on_test.go index c7e76a52fa..13d7814a33 100644 --- a/itest/list_on_test.go +++ b/itest/list_on_test.go @@ -277,6 +277,10 @@ var allTestCases = []*lntest.TestCase{ Name: "sign psbt", TestFunc: testSignPsbt, }, + { + Name: "fund psbt", + TestFunc: testFundPsbt, + }, { Name: "resolution handoff", TestFunc: testResHandoff, diff --git a/itest/lnd_psbt_test.go b/itest/lnd_psbt_test.go index cef7735794..d70d5a8dec 100644 --- a/itest/lnd_psbt_test.go +++ b/itest/lnd_psbt_test.go @@ -2,6 +2,7 @@ package itest import ( "bytes" + "encoding/hex" "testing" "time" @@ -11,6 +12,7 @@ import ( "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/btcutil/hdkeychain" "github.com/btcsuite/btcd/btcutil/psbt" + "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcd/wire" "github.com/lightningnetwork/lnd/funding" @@ -692,11 +694,11 @@ func runSignPsbtSegWitV0P2WKH(ht *lntest.HarnessTest, alice *node.HarnessNode) { } // Let's simulate a change address. - change, err := xpub.DeriveNonStandard(changeIndex) // nolint:staticcheck + change, err := xpub.DeriveNonStandard(changeIndex) require.NoError(ht, err) // At an index that we are certainly not watching in the wallet. - addrKey, err := change.DeriveNonStandard(addrIndex) // nolint:staticcheck + addrKey, err := change.DeriveNonStandard(addrIndex) require.NoError(ht, err) addrPubKey, err := addrKey.ECPubKey() @@ -773,11 +775,11 @@ func runSignPsbtSegWitV0NP2WKH(ht *lntest.HarnessTest, } // Let's simulate a change address. - change, err := xpub.DeriveNonStandard(changeIndex) // nolint:staticcheck + change, err := xpub.DeriveNonStandard(changeIndex) require.NoError(ht, err) // At an index that we are certainly not watching in the wallet. - addrKey, err := change.DeriveNonStandard(addrIndex) // nolint:staticcheck + addrKey, err := change.DeriveNonStandard(addrIndex) require.NoError(ht, err) addrPubKey, err := addrKey.ECPubKey() @@ -855,10 +857,11 @@ func runSignPsbtSegWitV1KeySpendBip86(ht *lntest.HarnessTest, PubKey: keyDesc.RawKeyBytes, Bip32Path: fullDerivationPath, }} - in.TaprootBip32Derivation = []*psbt.TaprootBip32Derivation{{ + p2trDerivation := []*psbt.TaprootBip32Derivation{{ XOnlyPubKey: keyDesc.RawKeyBytes[1:], Bip32Path: fullDerivationPath, }} + in.TaprootBip32Derivation = p2trDerivation in.SighashType = txscript.SigHashDefault }, func(packet *psbt.Packet) { @@ -902,10 +905,11 @@ func runSignPsbtSegWitV1KeySpendRootHash(ht *lntest.HarnessTest, PubKey: keyDesc.RawKeyBytes, Bip32Path: fullDerivationPath, }} - in.TaprootBip32Derivation = []*psbt.TaprootBip32Derivation{{ + p2trDerivation := []*psbt.TaprootBip32Derivation{{ XOnlyPubKey: keyDesc.RawKeyBytes[1:], Bip32Path: fullDerivationPath, }} + in.TaprootBip32Derivation = p2trDerivation in.TaprootMerkleRoot = rootHash[:] in.SighashType = txscript.SigHashDefault }, @@ -955,11 +959,12 @@ func runSignPsbtSegWitV1ScriptSpend(ht *lntest.HarnessTest, PubKey: keyDesc.RawKeyBytes, Bip32Path: fullDerivationPath, }} - in.TaprootBip32Derivation = []*psbt.TaprootBip32Derivation{{ + p2trDerivation := []*psbt.TaprootBip32Derivation{{ XOnlyPubKey: keyDesc.RawKeyBytes[1:], Bip32Path: fullDerivationPath, LeafHashes: [][]byte{rootHash[:]}, }} + in.TaprootBip32Derivation = p2trDerivation in.SighashType = txscript.SigHashDefault in.TaprootLeafScript = []*psbt.TaprootTapLeafScript{{ ControlBlock: controlBlockBytes, @@ -973,8 +978,8 @@ func runSignPsbtSegWitV1ScriptSpend(ht *lntest.HarnessTest, ht, packet.Inputs[0].TaprootScriptSpendSig, 1, ) - scriptSpendSig := packet.Inputs[0].TaprootScriptSpendSig[0] - require.Len(ht, scriptSpendSig.Signature, 64) + spendSig := packet.Inputs[0].TaprootScriptSpendSig[0] + require.Len(ht, spendSig.Signature, 64) }, ) } @@ -1032,6 +1037,265 @@ func runFundAndSignPsbt(ht *lntest.HarnessTest, alice *node.HarnessNode) { } } +// testFundPsbt tests the FundPsbt RPC use cases that aren't covered by the PSBT +// channel funding tests above. These specifically are the use cases of funding +// a PSBT that already specifies an input but where the user still wants the +// wallet to perform coin selection. +func testFundPsbt(ht *lntest.HarnessTest) { + // We test a pay-join between Alice and Bob. Bob wants to send Alice + // 5 million Satoshis in a non-obvious way. So Bob selects a UTXO that's + // bigger than 5 million Satoshis and expects the change minus the send + // amount back. Alice then funds the PSBT with coins of her own and + // combines her change with the 5 million Satoshis from Bob. With this + // Alice ends up paying the fees for a transfer to her. + const sendAmount = 5_000_000 + aliceAddr := ht.Alice.RPC.NewAddress(&lnrpc.NewAddressRequest{ + Type: lnrpc.AddressType_TAPROOT_PUBKEY, + }) + bobAddr := ht.Bob.RPC.NewAddress(&lnrpc.NewAddressRequest{ + Type: lnrpc.AddressType_TAPROOT_PUBKEY, + }) + + ht.Alice.UpdateState() + ht.Bob.UpdateState() + aliceStartBalance := ht.Alice.State.Wallet.TotalBalance + bobStartBalance := ht.Bob.State.Wallet.TotalBalance + + var bobUtxo *lnrpc.Utxo + bobUnspent := ht.Bob.RPC.ListUnspent(&walletrpc.ListUnspentRequest{}) + for _, utxo := range bobUnspent.Utxos { + if utxo.AmountSat > sendAmount { + bobUtxo = utxo + break + } + } + if bobUtxo == nil { + ht.Fatalf("Bob doesn't have a UTXO of at least %d sats", + sendAmount) + } + + bobUtxoTxHash, err := chainhash.NewHash(bobUtxo.Outpoint.TxidBytes) + require.NoError(ht, err) + + tx := wire.NewMsgTx(2) + tx.TxIn = append(tx.TxIn, &wire.TxIn{ + PreviousOutPoint: wire.OutPoint{ + Hash: *bobUtxoTxHash, + Index: bobUtxo.Outpoint.OutputIndex, + }, + }) + tx.TxOut = append(tx.TxOut, &wire.TxOut{ + // Change going back to Bob. + PkScript: addressToPkScript(ht, bobAddr.Address), + Value: bobUtxo.AmountSat - sendAmount, + }, &wire.TxOut{ + // Amount to be sent to Alice, but we'll also send her change + // here. + PkScript: addressToPkScript(ht, aliceAddr.Address), + Value: sendAmount, + }) + + packet, err := psbt.NewFromUnsignedTx(tx) + require.NoError(ht, err) + + derivation, trDerivation := getAddressBip32Derivation( + ht, bobUtxo.Address, ht.Bob, + ) + + bobUtxoPkScript, _ := hex.DecodeString(bobUtxo.PkScript) + firstInput := &packet.Inputs[0] + firstInput.WitnessUtxo = &wire.TxOut{ + PkScript: bobUtxoPkScript, + Value: bobUtxo.AmountSat, + } + firstInput.Bip32Derivation = []*psbt.Bip32Derivation{derivation} + firstInput.TaprootBip32Derivation = []*psbt.TaprootBip32Derivation{ + trDerivation, + } + if txscript.IsPayToWitnessPubKeyHash(bobUtxoPkScript) { + packet.Inputs[0].SighashType = txscript.SigHashAll + } + + // We have the template now. Bob basically funds the 5 million Sats to + // send to Alice and Alice now only needs to coin select to pay for the + // fees. + fundedPacket := fundPsbtCoinSelect(ht, ht.Alice, packet, 1) + txFee, err := fundedPacket.GetTxFee() + require.NoError(ht, err) + + // We now let Bob sign the transaction. + signedPacket := signPacket(ht, ht.Bob, fundedPacket) + + // And then Alice, which should give us a fully signed TX. + signedPacket = signPacket(ht, ht.Alice, signedPacket) + + // We should be able to finalize the PSBT and extract the final TX now. + extractPublishAndMine(ht, ht.Alice, signedPacket) + + // Make sure the new wallet balances are reflected correctly. + ht.AssertActiveNodesSynced() + ht.Alice.UpdateState() + ht.Bob.UpdateState() + + require.Equal( + ht, aliceStartBalance+sendAmount-int64(txFee), + ht.Alice.State.Wallet.TotalBalance, + ) + require.Equal( + ht, bobStartBalance-sendAmount, + ht.Bob.State.Wallet.TotalBalance, + ) +} + +// addressToPkScript parses the given address string and returns the pkScript +// for the regtest environment. +func addressToPkScript(t testing.TB, addr string) []byte { + parsed, err := btcutil.DecodeAddress(addr, harnessNetParams) + require.NoError(t, err) + + pkScript, err := txscript.PayToAddrScript(parsed) + require.NoError(t, err) + + return pkScript +} + +// getAddressBip32Derivation returns the PSBT BIP-0032 derivation info of an +// address. +func getAddressBip32Derivation(t testing.TB, addr string, + node *node.HarnessNode) (*psbt.Bip32Derivation, + *psbt.TaprootBip32Derivation) { + + // We can't query a single address directly, so we just query all wallet + // addresses. + addresses := node.RPC.ListAddresses( + &walletrpc.ListAddressesRequest{}, + ) + + var ( + path []uint32 + pubKeyBytes []byte + err error + ) + for _, account := range addresses.AccountWithAddresses { + for _, address := range account.Addresses { + if address.Address == addr { + path, err = lntest.ParseDerivationPath( + address.DerivationPath, + ) + require.NoError(t, err) + + pubKeyBytes = address.PublicKey + } + } + } + + if len(path) != 5 || len(pubKeyBytes) == 0 { + t.Fatalf("Derivation path for address %s not found or invalid", + addr) + } + + // The actual derivation path in a PSBT needs to be using the hardened + // uint32 notation for the first three elements. + path[0] += hdkeychain.HardenedKeyStart + path[1] += hdkeychain.HardenedKeyStart + path[2] += hdkeychain.HardenedKeyStart + + return &psbt.Bip32Derivation{ + PubKey: pubKeyBytes, + Bip32Path: path, + }, &psbt.TaprootBip32Derivation{ + XOnlyPubKey: pubKeyBytes[1:], + Bip32Path: path, + } +} + +// fundPsbtCoinSelect calls the FundPsbt RPC on the given node using the coin +// selection with template PSBT mode. +func fundPsbtCoinSelect(t testing.TB, node *node.HarnessNode, + packet *psbt.Packet, changeIndex int32) *psbt.Packet { + + var buf bytes.Buffer + err := packet.Serialize(&buf) + require.NoError(t, err) + + cs := &walletrpc.PsbtCoinSelect{ + Psbt: buf.Bytes(), + } + if changeIndex >= 0 { + cs.ChangeOutput = &walletrpc.PsbtCoinSelect_ExistingOutputIndex{ + ExistingOutputIndex: 1, + } + } else { + cs.ChangeOutput = &walletrpc.PsbtCoinSelect_Add{ + Add: true, + } + } + + fundResp := node.RPC.FundPsbt(&walletrpc.FundPsbtRequest{ + Template: &walletrpc.FundPsbtRequest_CoinSelect{ + CoinSelect: cs, + }, + Fees: &walletrpc.FundPsbtRequest_SatPerVbyte{ + SatPerVbyte: 50, + }, + }) + + fundedPacket, err := psbt.NewFromRawBytes( + bytes.NewReader(fundResp.FundedPsbt), false, + ) + require.NoError(t, err) + + return fundedPacket +} + +// signPacket calls the SignPsbt RPC on the given node. +func signPacket(t testing.TB, node *node.HarnessNode, + packet *psbt.Packet) *psbt.Packet { + + var buf bytes.Buffer + err := packet.Serialize(&buf) + require.NoError(t, err) + + signResp := node.RPC.SignPsbt(&walletrpc.SignPsbtRequest{ + FundedPsbt: buf.Bytes(), + }) + + // Let's make sure we have a partial signature. + signedPacket, err := psbt.NewFromRawBytes( + bytes.NewReader(signResp.SignedPsbt), false, + ) + require.NoError(t, err) + + return signedPacket +} + +// extractAndPublish extracts the final transaction from the packet and +// publishes it with the given node, mines a block and asserts the TX was mined +// successfully. +func extractPublishAndMine(ht *lntest.HarnessTest, node *node.HarnessNode, + packet *psbt.Packet) *wire.MsgTx { + + err := psbt.MaybeFinalizeAll(packet) + require.NoError(ht, err) + + finalTx, err := psbt.Extract(packet) + require.NoError(ht, err) + + var buf bytes.Buffer + err = finalTx.Serialize(&buf) + require.NoError(ht, err) + + // Publish the second transaction and then mine both of them. + node.RPC.PublishTransaction(&walletrpc.Transaction{TxHex: buf.Bytes()}) + + // Mine one block which should contain two transactions. + block := ht.MineBlocksAndAssertNumTxes(1, 1)[0] + txHash := finalTx.TxHash() + ht.Miner.AssertTxInBlock(block, &txHash) + + return finalTx +} + // assertPsbtSpend creates an output with the given pkScript on chain and then // attempts to create a sweep transaction that is signed using the SignPsbt RPC // that spends that output again. @@ -1102,18 +1366,7 @@ func assertPsbtSpend(ht *lntest.HarnessTest, alice *node.HarnessNode, decorateUnsigned(packet) // That's it, we should be able to sign the PSBT now. - buf.Reset() - err = packet.Serialize(&buf) - require.NoError(ht, err) - - signReq = &walletrpc.SignPsbtRequest{FundedPsbt: buf.Bytes()} - signResp := alice.RPC.SignPsbt(signReq) - - // Let's make sure we have a partial signature. - signedPacket, err := psbt.NewFromRawBytes( - bytes.NewReader(signResp.SignedPsbt), false, - ) - require.NoError(ht, err) + signedPacket := signPacket(ht, alice, packet) // Allow the caller to also verify (and potentially move) some of the // returned fields. @@ -1129,12 +1382,7 @@ func assertPsbtSpend(ht *lntest.HarnessTest, alice *node.HarnessNode, // Make sure we can also sign a second time. This makes sure any key // tweaking that happened for the signing didn't affect any keys in the // cache. - r := &walletrpc.SignPsbtRequest{FundedPsbt: buf.Bytes()} - signResp2 := alice.RPC.SignPsbt(r) - signedPacket2, err := psbt.NewFromRawBytes( - bytes.NewReader(signResp2.SignedPsbt), false, - ) - require.NoError(ht, err) + signedPacket2 := signPacket(ht, alice, packet) verifySigned(signedPacket2) buf.Reset() @@ -1227,32 +1475,14 @@ func assertPsbtFundSignSpend(ht *lntest.HarnessTest, alice *node.HarnessNode, ) require.NoError(ht, err) - // We should be able to finalize the PSBT and extract the final + // We should be able to finalize the PSBT, extract and publish the final // TX now. - err = psbt.MaybeFinalizeAll(signedPacket) - require.NoError(ht, err) - - finalTx, err := psbt.Extract(signedPacket) - require.NoError(ht, err) + finalTx := extractPublishAndMine(ht, alice, signedPacket) // Check type of the change script depending on the change address // type we provided in FundPsbt. changeScript := finalTx.TxOut[fundResp.ChangeOutputIndex].PkScript assertChangeScriptType(ht, changeScript, changeType) - - var buf bytes.Buffer - err = finalTx.Serialize(&buf) - require.NoError(ht, err) - - // Publish the second transaction and then mine both of them. - alice.RPC.PublishTransaction(&walletrpc.Transaction{ - TxHex: buf.Bytes(), - }) - - // Mine one block which should contain one transaction. - block := ht.MineBlocksAndAssertNumTxes(1, 1)[0] - finalTxHash := finalTx.TxHash() - ht.Miner.AssertTxInBlock(block, &finalTxHash) } // assertChangeScriptType checks if the given script has the right type given From c307d1eeda3d8da344c65c7fbe647d799c02777c Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Tue, 6 Feb 2024 12:26:03 +0100 Subject: [PATCH 17/17] docs: document fundtemplate sub command, add release notes --- docs/psbt.md | 38 ++++++++++++++++++++++ docs/release-notes/release-notes-0.18.0.md | 13 ++++++++ 2 files changed, 51 insertions(+) diff --git a/docs/psbt.md b/docs/psbt.md index ffcef79ed1..c1b824f50e 100644 --- a/docs/psbt.md +++ b/docs/psbt.md @@ -258,6 +258,44 @@ $ bitcoin-cli decodepsbt cHNidP8BAJoCAAAAAkiMdlxF3M20VpdnCMK0NOkEoETG6Aa4HpC8V } ``` +In newer versions of `lnd` (`v0.18.0-beta` and later), there is also the new +`lncli wallet psbt fundtemplate` command that offers a few advantages over the +previous `lncli wallet psbt fund` command: +1. The `fundtemplate` sub command allows users to specify only some inputs, even + if they aren't enough to pay for all the outputs. `lnd` will then select more + inputs and calculate the change amount and fee correctly (whereas the `fund` + command would return an error, complaining about not enough inputs being + specified). +2. The `fundtemplate` sub command allows users to specify that an existing + output should be used for any left-over change after selecting coins. + +Here's the above example with the new sub command, where we only specify one +input: + +```shell +$ LOCK_ID=$(cat /dev/urandom | head -c32 | xxd -p -c999) +$ lncli wallet leaseoutput --outpoint 3597b451ff56bc901eb806e8c644a004e934b4c208679756b4cddc455c768c48:1 \ + --lockid $LOCK_ID --expiry 600 +$ lncli wallet psbt fundtemplate --outputs='["bcrt1qjrdns4f5zwkv29ln86plqzs092yd5fg6nsz8re:50000000"]' \ + --inputs='["3597b451ff56bc901eb806e8c644a004e934b4c208679756b4cddc455c768c48:1"]' +{ + "psbt": "cHNidP8BAJoCAAAAAkiMdlxF3M20VpdnCMK0NOkEoETG6Aa4HpC8Vv9RtJc1AQAAAAAAAAAA4lBjZUtG260qBBgVRqMQqmMV+XRTKubrHbc66YOl7/gBAAAAAAAAAAACgPD6AgAAAAAWABSQ2zhVNBOsxRfzPoPwCg8qiNolGtIkCAcAAAAAFgAUuvRP5r7qAvj0egDxyX9/FH+vukgAAAAAAAEA3gIAAAAAAQEr9IZcho/gV/6fH8C8P+yhNRZP+l3YuxsyatdYcS0S6AEAAAAA/v///wLI/8+yAAAAABYAFDXoRFwgXNO5VVtVq2WpaENh6blAAOH1BQAAAAAWABTcAR0NeNdDHb96kMnH5EVUcr1YwwJHMEQCIDqugtYLp4ebJAZvOdieshLi1lLuPl2tHQG4jM4ybwEGAiBeMpCkbHBmzYvljxb1JBQyVAMuoco0xIfi+5OQdHuXaAEhAnH96NhTW09X0npE983YBsHUoMPI4U4xBtHenpZVTEqpVwAAAAEBHwDh9QUAAAAAFgAU3AEdDXjXQx2/epDJx+RFVHK9WMMBAwQBAAAAAAEA6wIAAAAAAQFvGpeAR/0OXNyqo0zrXSzmkvVfbnytrr4onbZ61vscBwEAAAAAAAAAAAIAJPQAAAAAACIAILtTVbSIkaFDqjsJ7EOHmTfpXq/fbnrGkD3/GYHYHJtMVl0NBAAAAAAWABQqnZOHOGzDIzZAeXK+YwHq1AHtXQJIMEUCIQDgx3xEhlioV1Q+yAPKiaXMwkv1snoejbckZOKFe0R6WAIgB41dEvK3zxI665YVWfcih0IThTkPoOiMgd6xGaKQXbwBIQMdgXMwQDF+Z+r3x5JKdm1TBvXDuYC0cbrnLyqJEU2ciQAAAAABAR9WXQ0EAAAAABYAFCqdk4c4bMMjNkB5cr5jAerUAe1dAQMEAQAAAAAAAA==", + "change_output_index": 1, + "locks": [ + { + "id": "ede19a92ed321a4705f8a1cccc1d4f6182545d4bb4fae08bd5937831b7e38f98", + "outpoint": "f8efa583e93ab71debe62a5374f91563aa10a3461518042aaddb464b656350e2:1", + "expiration": 1601560626 + } + ] +} +``` + +Note that the format of the `--outputs` parameter is slightly different from the +one in `lncli wallet psbt fund`. The order of the outputs is important in the +template, so the new command uses an array notation, where the old command used +a map (which doesn't guarantee preservation of the order of the elements). + ## Signing and finalizing a PSBT Assuming we now want to sign the transaction that we created in the previous diff --git a/docs/release-notes/release-notes-0.18.0.md b/docs/release-notes/release-notes-0.18.0.md index b38ae042c0..fa40597fb4 100644 --- a/docs/release-notes/release-notes-0.18.0.md +++ b/docs/release-notes/release-notes-0.18.0.md @@ -138,6 +138,10 @@ broadcast. This means when a transaction has failed the `testmempoolaccept` check by bitcoind or btcd, the broadcast won't be attempted. +* The `coin-selection-strategy` config option [now also applies to channel + funding operations and the new `PsbtCoinSelect` option of the `FundPsbt` + RPC](https://github.com/lightningnetwork/lnd/pull/8378). + ## RPC Additions * [Deprecated](https://github.com/lightningnetwork/lnd/pull/7175) @@ -167,6 +171,15 @@ is not considered for session negotiation. TerminateSession can be used to mark a specific session as terminal so that that specific is never used again. +* [The `FundPsbt` RPC method now has a third option for specifying a + template](https://github.com/lightningnetwork/lnd/pull/8378) to fund. This + new option will instruct the wallet to perform coin selection even if some + inputs are already specified in the template (which wasn't the case with + the previous options). Also, users have the option to specify whether a new + change output should be added or an existing output should be used for the + change. And the fee estimation is correct even if no change output is + required. + ## lncli Additions * Deprecate `bumpclosefee` for `bumpforceclosefee` to accommodate for the fact