From 641b4c8262f37541489a80a3c22854aa57ddcff3 Mon Sep 17 00:00:00 2001 From: Marko Bencun Date: Thu, 13 Feb 2025 12:06:21 +0100 Subject: [PATCH 1/6] simulator tests: capture simulator stdout Can be used to check if e.g. the firmware displays the expected confirmations to the user. Similar to https://github.com/BitBoxSwiss/bitbox-wallet-app/commit/e2ef67936d587afa78f730fc7c22fb6c79893e74. --- api/firmware/backup_test.go | 3 ++- api/firmware/bip85_test.go | 3 ++- api/firmware/btc_test.go | 16 ++++++----- api/firmware/cardano_test.go | 5 ++-- api/firmware/device_test.go | 51 +++++++++++++++++++++++------------ api/firmware/eth_test.go | 11 ++++---- api/firmware/mnemonic_test.go | 5 ++-- api/firmware/sdcard_test.go | 5 ++-- api/firmware/system_test.go | 5 ++-- cmd/miniscript/main.go | 1 + cmd/paymentrequest/main.go | 1 + 11 files changed, 68 insertions(+), 38 deletions(-) diff --git a/api/firmware/backup_test.go b/api/firmware/backup_test.go index 9d23f25..908df9a 100644 --- a/api/firmware/backup_test.go +++ b/api/firmware/backup_test.go @@ -15,6 +15,7 @@ package firmware import ( + "bytes" "testing" "github.com/stretchr/testify/require" @@ -23,7 +24,7 @@ import ( func TestSimulatorBackups(t *testing.T) { const seedLen = 32 const testName = "test wallet name" - testSimulatorsAfterPairing(t, func(t *testing.T, device *Device) { + testSimulatorsAfterPairing(t, func(t *testing.T, device *Device, stdOut *bytes.Buffer) { t.Helper() require.NoError(t, device.SetDeviceName(testName)) diff --git a/api/firmware/bip85_test.go b/api/firmware/bip85_test.go index 37914e6..9e8b3a4 100644 --- a/api/firmware/bip85_test.go +++ b/api/firmware/bip85_test.go @@ -15,6 +15,7 @@ package firmware import ( + "bytes" "encoding/hex" "testing" @@ -27,7 +28,7 @@ func TestSimulatorBIP85AppBip39(t *testing.T) { } func TestSimulatorBIP85AppLN(t *testing.T) { - testInitializedSimulators(t, func(t *testing.T, device *Device) { + testInitializedSimulators(t, func(t *testing.T, device *Device, stdOut *bytes.Buffer) { t.Helper() entropy, err := device.BIP85AppLN() require.NoError(t, err) diff --git a/api/firmware/btc_test.go b/api/firmware/btc_test.go index 12438ee..c0c763e 100644 --- a/api/firmware/btc_test.go +++ b/api/firmware/btc_test.go @@ -16,6 +16,7 @@ package firmware import ( + "bytes" "errors" "testing" @@ -68,7 +69,7 @@ func TestNewXPub(t *testing.T) { } func TestBTCXpub(t *testing.T) { - testInitializedSimulators(t, func(t *testing.T, device *Device) { + testInitializedSimulators(t, func(t *testing.T, device *Device, stdOut *bytes.Buffer) { t.Helper() xpub, err := device.BTCXPub(messages.BTCCoin_TBTC, []uint32{ 49 + hardenedKeyStart, @@ -81,7 +82,7 @@ func TestBTCXpub(t *testing.T) { } func TestBTCAddress(t *testing.T) { - testInitializedSimulators(t, func(t *testing.T, device *Device) { + testInitializedSimulators(t, func(t *testing.T, device *Device, stdOut *bytes.Buffer) { t.Helper() address, err := device.BTCAddress( messages.BTCCoin_TBTC, @@ -114,7 +115,7 @@ func simulatorPub(t *testing.T, device *Device, keypath ...uint32) *btcec.Public } func TestSimulatorBTCSignMessage(t *testing.T) { - testInitializedSimulators(t, func(t *testing.T, device *Device) { + testInitializedSimulators(t, func(t *testing.T, device *Device, stdOut *bytes.Buffer) { t.Helper() coin := messages.BTCCoin_BTC keypath := []uint32{49 + hardenedKeyStart, 0 + hardenedKeyStart, 0 + hardenedKeyStart, 0, 10} @@ -341,7 +342,7 @@ func makeTaprootOutput(t *testing.T, pubkey *btcec.PublicKey) (*btcec.PublicKey, // Test signing; all inputs are BIP86 Taproot keyspends. func TestSimulatorBTCSignTaprootKeySpend(t *testing.T) { - testInitializedSimulators(t, func(t *testing.T, device *Device) { + testInitializedSimulators(t, func(t *testing.T, device *Device, stdOut *bytes.Buffer) { t.Helper() coin := messages.BTCCoin_BTC accountKeypath := []uint32{86 + hardenedKeyStart, 0 + hardenedKeyStart, 0 + hardenedKeyStart} @@ -385,6 +386,7 @@ func TestSimulatorBTCSignTaprootKeySpend(t *testing.T) { _, _, err := device.BTCSign( coin, scriptConfigs, + nil, &BTCTx{ Version: 2, Inputs: []*BTCTxInput{ @@ -431,7 +433,7 @@ func TestSimulatorBTCSignTaprootKeySpend(t *testing.T) { // Test signing; mixed input types (p2wpkh, p2wpkh-p2sh, p2tr) func TestSimulatorBTCSignMixed(t *testing.T) { - testInitializedSimulators(t, func(t *testing.T, device *Device) { + testInitializedSimulators(t, func(t *testing.T, device *Device, stdOut *bytes.Buffer) { t.Helper() coin := messages.BTCCoin_BTC changeKeypath := []uint32{86 + hardenedKeyStart, 0 + hardenedKeyStart, 0 + hardenedKeyStart, 1, 0} @@ -513,6 +515,7 @@ func TestSimulatorBTCSignMixed(t *testing.T) { _, _, err := device.BTCSign( coin, scriptConfigs, + nil, &BTCTx{ Version: 2, Inputs: []*BTCTxInput{ @@ -573,7 +576,7 @@ func TestSimulatorBTCSignMixed(t *testing.T) { // Test that we can send to a silent payment output (generated by the BitBox) and verify the // corresponding DLEQ proof on the host that the output was generated correctly. func TestSimulatorBTCSignSilentPayment(t *testing.T) { - testInitializedSimulators(t, func(t *testing.T, device *Device) { + testInitializedSimulators(t, func(t *testing.T, device *Device, stdOut *bytes.Buffer) { t.Helper() coin := messages.BTCCoin_BTC accountKeypath := []uint32{86 + hardenedKeyStart, 0 + hardenedKeyStart, 0 + hardenedKeyStart} @@ -614,6 +617,7 @@ func TestSimulatorBTCSignSilentPayment(t *testing.T) { Keypath: accountKeypath, }, }, + nil, &BTCTx{ Version: 2, Inputs: []*BTCTxInput{ diff --git a/api/firmware/cardano_test.go b/api/firmware/cardano_test.go index 2c82bf5..f3abeb5 100644 --- a/api/firmware/cardano_test.go +++ b/api/firmware/cardano_test.go @@ -15,6 +15,7 @@ package firmware import ( + "bytes" "encoding/hex" "testing" @@ -23,7 +24,7 @@ import ( ) func TestSimulatorCardanoXPubs(t *testing.T) { - testInitializedSimulators(t, func(t *testing.T, device *Device) { + testInitializedSimulators(t, func(t *testing.T, device *Device, stdOut *bytes.Buffer) { t.Helper() xpubs, err := device.CardanoXPubs( [][]uint32{ @@ -45,7 +46,7 @@ func TestSimulatorCardanoXPubs(t *testing.T) { } func TestSimulatorCardanoAddress(t *testing.T) { - testInitializedSimulators(t, func(t *testing.T, device *Device) { + testInitializedSimulators(t, func(t *testing.T, device *Device, stdOut *bytes.Buffer) { t.Helper() const account = uint32(1) const rolePayment = uint32(0) // receive diff --git a/api/firmware/device_test.go b/api/firmware/device_test.go index f71be7f..400ee08 100644 --- a/api/firmware/device_test.go +++ b/api/firmware/device_test.go @@ -16,6 +16,8 @@ package firmware import ( + "bufio" + "bytes" "crypto/rand" "crypto/sha256" "encoding/hex" @@ -45,13 +47,28 @@ import ( "google.golang.org/protobuf/proto" ) -func runSimulator(filename string) (func() error, *Device, error) { - cmd := exec.Command(filename) +func runSimulator(filename string) (func() error, *Device, *bytes.Buffer, error) { + cmd := exec.Command("stdbuf", "-oL", filename) + + // Create pipe before starting process + stdout, err := cmd.StdoutPipe() + if err != nil { + return nil, nil, nil, err + } if err := cmd.Start(); err != nil { - return nil, nil, err + return nil, nil, nil, err } + + var stdoutBuf bytes.Buffer + scanner := bufio.NewScanner(stdout) + go func() { + for scanner.Scan() { + stdoutBuf.Write(scanner.Bytes()) + stdoutBuf.WriteByte('\n') + } + }() + var conn net.Conn - var err error for range 200 { conn, err = net.Dial("tcp", "localhost:15423") if err == nil { @@ -60,7 +77,7 @@ func runSimulator(filename string) (func() error, *Device, error) { time.Sleep(10 * time.Millisecond) } if err != nil { - return nil, nil, err + return nil, nil, nil, err } const bitboxCMD = 0x80 + 0x40 + 0x01 @@ -73,7 +90,7 @@ func runSimulator(filename string) (func() error, *Device, error) { return err } return cmd.Process.Kill() - }, device, nil + }, device, &stdoutBuf, nil } // Download BitBox simulators based on testdata/simulators.json to testdata/simulators/*. @@ -162,7 +179,7 @@ func downloadSimulators() ([]string, error) { var downloadSimulatorsOnce = sync.OnceValues(downloadSimulators) // Runs tests against a simulator which is not initialized (not paired, not seeded). -func testSimulators(t *testing.T, run func(*testing.T, *Device)) { +func testSimulators(t *testing.T, run func(*testing.T, *Device, *bytes.Buffer)) { t.Helper() if runtime.GOOS != "linux" || runtime.GOARCH != "amd64" { t.Skip("Skipping simulator tests: not running on linux-amd64") @@ -180,39 +197,39 @@ func testSimulators(t *testing.T, run func(*testing.T, *Device)) { for _, simulatorFilename := range simulatorFilenames { t.Run(filepath.Base(simulatorFilename), func(t *testing.T) { - teardown, device, err := runSimulator(simulatorFilename) + teardown, device, stdOut, err := runSimulator(simulatorFilename) require.NoError(t, err) defer func() { require.NoError(t, teardown()) }() - run(t, device) + run(t, device, stdOut) }) } } // Runs tests against a simulator which is not initialized, but paired (not seeded). -func testSimulatorsAfterPairing(t *testing.T, run func(*testing.T, *Device)) { +func testSimulatorsAfterPairing(t *testing.T, run func(*testing.T, *Device, *bytes.Buffer)) { t.Helper() - testSimulators(t, func(t *testing.T, device *Device) { + testSimulators(t, func(t *testing.T, device *Device, stdOut *bytes.Buffer) { t.Helper() require.NoError(t, device.Init()) device.ChannelHashVerify(true) - run(t, device) + run(t, device, stdOut) }) } // Runs tests againt a simulator that is seeded with this mnemonic: boring mistake dish oyster truth // pigeon viable emerge sort crash wire portion cannon couple enact box walk height pull today solid // off enable tide -func testInitializedSimulators(t *testing.T, run func(*testing.T, *Device)) { +func testInitializedSimulators(t *testing.T, run func(*testing.T, *Device, *bytes.Buffer)) { t.Helper() - testSimulatorsAfterPairing(t, func(t *testing.T, device *Device) { + testSimulatorsAfterPairing(t, func(t *testing.T, device *Device, stdOut *bytes.Buffer) { t.Helper() require.NoError(t, device.RestoreFromMnemonic()) - run(t, device) + run(t, device, stdOut) }) } func TestSimulatorRootFingerprint(t *testing.T) { - testInitializedSimulators(t, func(t *testing.T, device *Device) { + testInitializedSimulators(t, func(t *testing.T, device *Device, stdOut *bytes.Buffer) { t.Helper() fp, err := device.RootFingerprint() require.NoError(t, err) @@ -492,7 +509,7 @@ func TestVersion(t *testing.T) { } func TestSimulatorProduct(t *testing.T) { - testSimulators(t, func(t *testing.T, device *Device) { + testSimulators(t, func(t *testing.T, device *Device, stdOut *bytes.Buffer) { t.Helper() require.NoError(t, device.Init()) require.Equal(t, common.ProductBitBox02Multi, device.Product()) diff --git a/api/firmware/eth_test.go b/api/firmware/eth_test.go index 1706152..3a546cf 100644 --- a/api/firmware/eth_test.go +++ b/api/firmware/eth_test.go @@ -15,6 +15,7 @@ package firmware import ( + "bytes" "math/big" "testing" @@ -247,7 +248,7 @@ func TestEncodeValue(t *testing.T) { } func TestSimulatorETHPub(t *testing.T) { - testInitializedSimulators(t, func(t *testing.T, device *Device) { + testInitializedSimulators(t, func(t *testing.T, device *Device, stdOut *bytes.Buffer) { t.Helper() chainID := uint64(1) xpub, err := device.ETHPub( @@ -290,7 +291,7 @@ func TestSimulatorETHPub(t *testing.T) { } func TestSimulatorETHSignMessage(t *testing.T) { - testInitializedSimulators(t, func(t *testing.T, device *Device) { + testInitializedSimulators(t, func(t *testing.T, device *Device, stdOut *bytes.Buffer) { t.Helper() chainID := uint64(1) keypath := []uint32{ @@ -315,7 +316,7 @@ func TestSimulatorETHSignMessage(t *testing.T) { } func TestSimulatorETHSignTypedMessage(t *testing.T) { - testInitializedSimulators(t, func(t *testing.T, device *Device) { + testInitializedSimulators(t, func(t *testing.T, device *Device, stdOut *bytes.Buffer) { t.Helper() msg := []byte(` { @@ -381,7 +382,7 @@ func TestSimulatorETHSignTypedMessage(t *testing.T) { } func TestSimulatorETHSign(t *testing.T) { - testInitializedSimulators(t, func(t *testing.T, device *Device) { + testInitializedSimulators(t, func(t *testing.T, device *Device, stdOut *bytes.Buffer) { t.Helper() chainID := uint64(1) keypath := []uint32{ @@ -416,7 +417,7 @@ func TestSimulatorETHSign(t *testing.T) { } func TestSimulatorETHSignEIP1559(t *testing.T) { - testInitializedSimulators(t, func(t *testing.T, device *Device) { + testInitializedSimulators(t, func(t *testing.T, device *Device, stdOut *bytes.Buffer) { t.Helper() chainID := uint64(1) keypath := []uint32{ diff --git a/api/firmware/mnemonic_test.go b/api/firmware/mnemonic_test.go index 530a588..e0fa024 100644 --- a/api/firmware/mnemonic_test.go +++ b/api/firmware/mnemonic_test.go @@ -15,20 +15,21 @@ package firmware import ( + "bytes" "testing" "github.com/stretchr/testify/require" ) func TestSimulatorShowMnemonic(t *testing.T) { - testInitializedSimulators(t, func(t *testing.T, device *Device) { + testInitializedSimulators(t, func(t *testing.T, device *Device, stdOut *bytes.Buffer) { t.Helper() require.NoError(t, device.ShowMnemonic()) }) } func TestSimulatorSetMnemonicPassphraseEnabled(t *testing.T) { - testInitializedSimulators(t, func(t *testing.T, device *Device) { + testInitializedSimulators(t, func(t *testing.T, device *Device, stdOut *bytes.Buffer) { t.Helper() info, err := device.DeviceInfo() require.NoError(t, err) diff --git a/api/firmware/sdcard_test.go b/api/firmware/sdcard_test.go index c054b26..20e856a 100644 --- a/api/firmware/sdcard_test.go +++ b/api/firmware/sdcard_test.go @@ -15,13 +15,14 @@ package firmware import ( + "bytes" "testing" "github.com/stretchr/testify/require" ) func TestSimulatorCheckSDCard(t *testing.T) { - testSimulatorsAfterPairing(t, func(t *testing.T, device *Device) { + testSimulatorsAfterPairing(t, func(t *testing.T, device *Device, stdOut *bytes.Buffer) { t.Helper() inserted, err := device.CheckSDCard() require.NoError(t, err) @@ -31,7 +32,7 @@ func TestSimulatorCheckSDCard(t *testing.T) { } func TestSimutorInsertSDCard(t *testing.T) { - testSimulatorsAfterPairing(t, func(t *testing.T, device *Device) { + testSimulatorsAfterPairing(t, func(t *testing.T, device *Device, stdOut *bytes.Buffer) { t.Helper() require.NoError(t, device.InsertSDCard()) }) diff --git a/api/firmware/system_test.go b/api/firmware/system_test.go index 416fb60..46e6583 100644 --- a/api/firmware/system_test.go +++ b/api/firmware/system_test.go @@ -15,6 +15,7 @@ package firmware import ( + "bytes" "fmt" "testing" @@ -22,7 +23,7 @@ import ( ) func TestSimulatorDeviceName(t *testing.T) { - testSimulatorsAfterPairing(t, func(t *testing.T, device *Device) { + testSimulatorsAfterPairing(t, func(t *testing.T, device *Device, stdOut *bytes.Buffer) { t.Helper() info, err := device.DeviceInfo() require.NoError(t, err) @@ -42,7 +43,7 @@ func TestSimulatorDeviceName(t *testing.T) { func TestSimulatorSetPassword(t *testing.T) { for _, seedLen := range []int{16, 32} { t.Run(fmt.Sprintf("seedLen=%d", seedLen), func(t *testing.T) { - testSimulatorsAfterPairing(t, func(t *testing.T, device *Device) { + testSimulatorsAfterPairing(t, func(t *testing.T, device *Device, stdOut *bytes.Buffer) { t.Helper() require.NoError(t, device.SetPassword(seedLen)) require.Equal(t, StatusSeeded, device.Status()) diff --git a/cmd/miniscript/main.go b/cmd/miniscript/main.go index 7747690..e56b996 100644 --- a/cmd/miniscript/main.go +++ b/cmd/miniscript/main.go @@ -339,6 +339,7 @@ func main() { Keypath: accountKeypath, }, }, + nil, &firmware.BTCTx{ Version: uint32(withdrawalTransaction.Version), Inputs: []*firmware.BTCTxInput{{ diff --git a/cmd/paymentrequest/main.go b/cmd/paymentrequest/main.go index 8aa57fd..78e66f7 100644 --- a/cmd/paymentrequest/main.go +++ b/cmd/paymentrequest/main.go @@ -175,6 +175,7 @@ func main() { Keypath: []uint32{84 + HARDENED, 1 + HARDENED, 0 + HARDENED}, }, }, + nil, &firmware.BTCTx{ Version: 2, Inputs: []*firmware.BTCTxInput{{ From 00887cdae8723125dd3b42f122a4040fea6a4a76 Mon Sep 17 00:00:00 2001 From: Marko Bencun Date: Thu, 30 Jan 2025 15:38:48 +0100 Subject: [PATCH 2/6] btc: add support for detecting self-sends to different accounts Can only make use of it starting v9.22.0. The .proto messages have been pulled from https://github.com/BitBoxSwiss/bitbox02-firmware/tree/c35647384740683ab06309ff34b3395d5c026d58/messages and the .pb.go files generated from it according to this repo's README instructions. When sending coins to an address of the same keystore, but different account, you can provide the script config of the other account in the `outputScriptConfigs` and link the output to it. --- api/firmware/btc.go | 6 + api/firmware/btc_test.go | 178 ++++++++ api/firmware/messages/btc.pb.go | 680 +++++++++++++++------------- api/firmware/messages/btc.proto | 16 +- api/firmware/messages/cardano.pb.go | 515 ++++++++++++++------- api/firmware/messages/cardano.proto | 19 +- cmd/playground/main.go | 1 + 7 files changed, 930 insertions(+), 485 deletions(-) diff --git a/api/firmware/btc.go b/api/firmware/btc.go index 215ce22..f9b2b57 100644 --- a/api/firmware/btc.go +++ b/api/firmware/btc.go @@ -284,6 +284,7 @@ type BTCTx struct { func (device *Device) BTCSign( coin messages.BTCCoin, scriptConfigs []*messages.BTCScriptConfigWithKeypath, + outputScriptConfigs []*messages.BTCScriptConfigWithKeypath, tx *BTCTx, formatUnit messages.BTCSignInitRequest_FormatUnit, ) ([][]byte, map[int][]byte, error) { @@ -310,6 +311,10 @@ func (device *Device) BTCSign( return nil, nil, UnsupportedError("9.21.0") } + if len(outputScriptConfigs) > 0 && !device.version.AtLeast(semver.NewSemVer(9, 22, 0)) { + return nil, nil, UnsupportedError("9.22.0") + } + signatures := make([][]byte, len(tx.Inputs)) next, err := device.queryBtcSign(&messages.Request{ Request: &messages.Request_BtcSignInit{ @@ -322,6 +327,7 @@ func (device *Device) BTCSign( Locktime: tx.Locktime, FormatUnit: formatUnit, ContainsSilentPaymentOutputs: containsSilentPaymentOutputs, + OutputScriptConfigs: outputScriptConfigs, }}}) if err != nil { return nil, nil, err diff --git a/api/firmware/btc_test.go b/api/firmware/btc_test.go index c0c763e..70bc8f3 100644 --- a/api/firmware/btc_test.go +++ b/api/firmware/btc_test.go @@ -37,6 +37,7 @@ import ( const hardenedKeyStart = 0x80000000 +//nolint:unparam func mustOutpoint(s string) *wire.OutPoint { outPoint, err := wire.NewOutPointFromString(s) if err != nil { @@ -675,3 +676,180 @@ func TestSimulatorBTCSignSilentPayment(t *testing.T) { } }) } + +// Tests that the BitBox displays the output as being of the same account in a self-send. +func TestSimulatorSignBTCTransactionSendSelfSameAccount(t *testing.T) { + testInitializedSimulators(t, func(t *testing.T, device *Device, stdOut *bytes.Buffer) { + t.Helper() + coin := messages.BTCCoin_BTC + + input0Keypath := []uint32{86 + hardenedKeyStart, 0 + hardenedKeyStart, 0 + hardenedKeyStart, 0, 0} + input1Keypath := []uint32{86 + hardenedKeyStart, 0 + hardenedKeyStart, 0 + hardenedKeyStart, 0, 1} + + prevTx := &wire.MsgTx{ + Version: 2, + TxIn: []*wire.TxIn{ + { + PreviousOutPoint: *mustOutpoint("3131313131313131313131313131313131313131313131313131313131313131:0"), + Sequence: 0xFFFFFFFF, + }, + }, + TxOut: []*wire.TxOut{ + { + Value: 100_000_000, + PkScript: func() []byte { + _, script := makeTaprootOutput(t, simulatorPub(t, device, input0Keypath...)) + return script + }(), + }, + }, + LockTime: 0, + } + convertedPrevTx := NewBTCPrevTxFromBtcd(prevTx) + + scriptConfigs := []*messages.BTCScriptConfigWithKeypath{ + { + ScriptConfig: NewBTCScriptConfigSimple(messages.BTCScriptConfig_P2TR), + Keypath: input0Keypath[:3], + }, + } + + prevTxHash := prevTx.TxHash() + _, _, err := device.BTCSign( + coin, + scriptConfigs, + nil, + &BTCTx{ + Version: 2, + Inputs: []*BTCTxInput{ + { + Input: &messages.BTCSignInputRequest{ + PrevOutHash: prevTxHash[:], + PrevOutIndex: 0, + PrevOutValue: uint64(prevTx.TxOut[0].Value), + Sequence: 0xFFFFFFFF, + Keypath: input0Keypath, + ScriptConfigIndex: 0, + }, + PrevTx: convertedPrevTx, + }, + }, + Outputs: []*messages.BTCSignOutputRequest{ + { + Ours: true, + Value: 70_000_000, + Keypath: input1Keypath, + }, + }, + Locktime: 0, + }, + messages.BTCSignInitRequest_DEFAULT, + ) + require.NoError(t, err) + + switch { + // Display changed in v9.22.0. + case device.Version().AtLeast(semver.NewSemVer(9, 22, 0)): + require.Contains(t, + stdOut.String(), + "This BitBox (same account): bc1psz0tsdr9sgnukfcx4gtwpp5exyeqdycfqjvm2jw6tvsj3k3eavts20yuag", + ) + case device.Version().AtLeast(semver.NewSemVer(9, 20, 0)): + require.Contains(t, + stdOut.String(), + "This BitBox02: bc1psz0tsdr9sgnukfcx4gtwpp5exyeqdycfqjvm2jw6tvsj3k3eavts20yuag", + ) + } + // Before simulator v9.20, address confirmation data was not written to stdout. + }) +} + +// Tests that the BitBox displays the output as being of the same keystore, but different account. +func TestSimulatorSignBTCTransactionSendSelfDifferentAccount(t *testing.T) { + testInitializedSimulators(t, func(t *testing.T, device *Device, stdOut *bytes.Buffer) { + t.Helper() + coin := messages.BTCCoin_BTC + + input0Keypath := []uint32{86 + hardenedKeyStart, 0 + hardenedKeyStart, 0 + hardenedKeyStart, 0, 0} + input1Keypath := []uint32{86 + hardenedKeyStart, 0 + hardenedKeyStart, 1 + hardenedKeyStart, 0, 0} + + prevTx := &wire.MsgTx{ + Version: 2, + TxIn: []*wire.TxIn{ + { + PreviousOutPoint: *mustOutpoint("3131313131313131313131313131313131313131313131313131313131313131:0"), + Sequence: 0xFFFFFFFF, + }, + }, + TxOut: []*wire.TxOut{ + { + Value: 100_000_000, + PkScript: func() []byte { + _, script := makeTaprootOutput(t, simulatorPub(t, device, input0Keypath...)) + return script + }(), + }, + }, + LockTime: 0, + } + convertedPrevTx := NewBTCPrevTxFromBtcd(prevTx) + + scriptConfigs := []*messages.BTCScriptConfigWithKeypath{ + { + ScriptConfig: NewBTCScriptConfigSimple(messages.BTCScriptConfig_P2TR), + Keypath: input0Keypath[:3], + }, + } + outputScriptConfigs := []*messages.BTCScriptConfigWithKeypath{ + { + ScriptConfig: NewBTCScriptConfigSimple(messages.BTCScriptConfig_P2TR), + Keypath: input1Keypath[:3], + }, + } + outputScriptConfigIndex := uint32(0) + + prevTxHash := prevTx.TxHash() + _, _, err := device.BTCSign( + coin, + scriptConfigs, + outputScriptConfigs, + &BTCTx{ + Version: 2, + Inputs: []*BTCTxInput{ + { + Input: &messages.BTCSignInputRequest{ + PrevOutHash: prevTxHash[:], + PrevOutIndex: 0, + PrevOutValue: uint64(prevTx.TxOut[0].Value), + Sequence: 0xFFFFFFFF, + Keypath: input0Keypath, + ScriptConfigIndex: 0, + }, + PrevTx: convertedPrevTx, + }, + }, + Outputs: []*messages.BTCSignOutputRequest{ + { + Ours: true, + Value: 70_000_000, + Keypath: input1Keypath, + OutputScriptConfigIndex: &outputScriptConfigIndex, + }, + }, + Locktime: 0, + }, + messages.BTCSignInitRequest_DEFAULT, + ) + + // Introduced in v9.22.0. + if !device.Version().AtLeast(semver.NewSemVer(9, 22, 0)) { + require.EqualError(t, err, UnsupportedError("9.22.0").Error()) + return + } + require.NoError(t, err) + require.Contains(t, + stdOut.String(), + "This BitBox (account #2): bc1pzeyhtmk2d5jrjunam30dus0p34095m622dq7trm7r0g8pwac2gvqxh8d47", + ) + }) +} diff --git a/api/firmware/messages/btc.pb.go b/api/firmware/messages/btc.pb.go index d80ba25..f3a4320 100644 --- a/api/firmware/messages/btc.pb.go +++ b/api/firmware/messages/btc.pb.go @@ -42,6 +42,8 @@ const ( BTCCoin_TBTC BTCCoin = 1 BTCCoin_LTC BTCCoin = 2 BTCCoin_TLTC BTCCoin = 3 + // Regtest + BTCCoin_RBTC BTCCoin = 4 ) // Enum value maps for BTCCoin. @@ -51,12 +53,14 @@ var ( 1: "TBTC", 2: "LTC", 3: "TLTC", + 4: "RBTC", } BTCCoin_value = map[string]int32{ "BTC": 0, "TBTC": 1, "LTC": 2, "TLTC": 3, + "RBTC": 4, } ) @@ -741,6 +745,9 @@ type BTCSignInitRequest struct { Locktime uint32 `protobuf:"varint,7,opt,name=locktime,proto3" json:"locktime,omitempty"` // must be <500000000 FormatUnit BTCSignInitRequest_FormatUnit `protobuf:"varint,8,opt,name=format_unit,json=formatUnit,proto3,enum=shiftcrypto.bitbox02.BTCSignInitRequest_FormatUnit" json:"format_unit,omitempty"` ContainsSilentPaymentOutputs bool `protobuf:"varint,9,opt,name=contains_silent_payment_outputs,json=containsSilentPaymentOutputs,proto3" json:"contains_silent_payment_outputs,omitempty"` + // used script configs for outputs that send to an address of the same keystore, but not + // necessarily the same account (as defined by `script_configs` above). + OutputScriptConfigs []*BTCScriptConfigWithKeypath `protobuf:"bytes,10,rep,name=output_script_configs,json=outputScriptConfigs,proto3" json:"output_script_configs,omitempty"` } func (x *BTCSignInitRequest) Reset() { @@ -831,6 +838,13 @@ func (x *BTCSignInitRequest) GetContainsSilentPaymentOutputs() bool { return false } +func (x *BTCSignInitRequest) GetOutputScriptConfigs() []*BTCScriptConfigWithKeypath { + if x != nil { + return x.OutputScriptConfigs + } + return nil +} + type BTCSignNextResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -845,7 +859,7 @@ type BTCSignNextResponse struct { // Previous tx's input/output index in case of PREV_INPUT or PREV_OUTPUT, for the input at `index`. PrevIndex uint32 `protobuf:"varint,5,opt,name=prev_index,json=prevIndex,proto3" json:"prev_index,omitempty"` AntiKleptoSignerCommitment *AntiKleptoSignerCommitment `protobuf:"bytes,6,opt,name=anti_klepto_signer_commitment,json=antiKleptoSignerCommitment,proto3" json:"anti_klepto_signer_commitment,omitempty"` - // Generated output. The host *must* verify its correctness using silent_payment_dleq_proof. + // Generated output. The host *must* verify its correctness using `silent_payment_dleq_proof`. GeneratedOutputPkscript []byte `protobuf:"bytes,7,opt,name=generated_output_pkscript,json=generatedOutputPkscript,proto3" json:"generated_output_pkscript,omitempty"` SilentPaymentDleqProof []byte `protobuf:"bytes,8,opt,name=silent_payment_dleq_proof,json=silentPaymentDleqProof,proto3" json:"silent_payment_dleq_proof,omitempty"` } @@ -1045,12 +1059,19 @@ type BTCSignOutputRequest struct { Value uint64 `protobuf:"varint,3,opt,name=value,proto3" json:"value,omitempty"` Payload []byte `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"` // if ours is false. Renamed from `hash`. Keypath []uint32 `protobuf:"varint,5,rep,packed,name=keypath,proto3" json:"keypath,omitempty"` // if ours is true - // If ours is true. References a script config from BTCSignInitRequest + // If ours is true and `output_script_config_index` is absent. References a script config from + // BTCSignInitRequest. This allows change output identification and allows us to identify + // non-change outputs to the same account, so we can display this info to the user. ScriptConfigIndex uint32 `protobuf:"varint,6,opt,name=script_config_index,json=scriptConfigIndex,proto3" json:"script_config_index,omitempty"` PaymentRequestIndex *uint32 `protobuf:"varint,7,opt,name=payment_request_index,json=paymentRequestIndex,proto3,oneof" json:"payment_request_index,omitempty"` // If provided, `type` and `payload` is ignored. The generated output pkScript is returned in // BTCSignNextResponse. `contains_silent_payment_outputs` in the init request must be true. SilentPayment *BTCSignOutputRequest_SilentPayment `protobuf:"bytes,8,opt,name=silent_payment,json=silentPayment,proto3" json:"silent_payment,omitempty"` + // If ours is true. If set, `script_config_index` is ignored. References an output script config + // from BTCSignInitRequest. This enables verification that an output belongs to the same keystore, + // even if it is from a different account than we spend from, allowing us to display this info to + // the user. + OutputScriptConfigIndex *uint32 `protobuf:"varint,9,opt,name=output_script_config_index,json=outputScriptConfigIndex,proto3,oneof" json:"output_script_config_index,omitempty"` } func (x *BTCSignOutputRequest) Reset() { @@ -1141,6 +1162,13 @@ func (x *BTCSignOutputRequest) GetSilentPayment() *BTCSignOutputRequest_SilentPa return nil } +func (x *BTCSignOutputRequest) GetOutputScriptConfigIndex() uint32 { + if x != nil && x.OutputScriptConfigIndex != nil { + return *x.OutputScriptConfigIndex + } + return 0 +} + type BTCScriptConfigRegistration struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2462,7 +2490,7 @@ var file_btc_proto_rawDesc = []byte{ 0x54, 0x43, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x07, 0x6b, - 0x65, 0x79, 0x70, 0x61, 0x74, 0x68, 0x22, 0xd7, 0x03, 0x0a, 0x12, 0x42, 0x54, 0x43, 0x53, 0x69, + 0x65, 0x79, 0x70, 0x61, 0x74, 0x68, 0x22, 0xbd, 0x04, 0x0a, 0x12, 0x42, 0x54, 0x43, 0x53, 0x69, 0x67, 0x6e, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x04, 0x63, 0x6f, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, @@ -2489,295 +2517,308 @@ var file_btc_proto_rawDesc = []byte{ 0x73, 0x5f, 0x73, 0x69, 0x6c, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1c, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x53, 0x69, 0x6c, 0x65, 0x6e, 0x74, 0x50, 0x61, - 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x22, 0x22, 0x0a, 0x0a, - 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, - 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x41, 0x54, 0x10, 0x01, - 0x22, 0xc2, 0x04, 0x0a, 0x13, 0x42, 0x54, 0x43, 0x53, 0x69, 0x67, 0x6e, 0x4e, 0x65, 0x78, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, - 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x42, 0x54, - 0x43, 0x53, 0x69, 0x67, 0x6e, 0x4e, 0x65, 0x78, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x69, 0x6e, 0x64, - 0x65, 0x78, 0x12, 0x23, 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x68, 0x61, 0x73, 0x53, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x65, 0x76, 0x5f, 0x69, 0x6e, - 0x64, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x70, 0x72, 0x65, 0x76, 0x49, - 0x6e, 0x64, 0x65, 0x78, 0x12, 0x73, 0x0a, 0x1d, 0x61, 0x6e, 0x74, 0x69, 0x5f, 0x6b, 0x6c, 0x65, - 0x70, 0x74, 0x6f, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, - 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x73, 0x68, + 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x12, 0x64, 0x0a, 0x15, + 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, - 0x30, 0x32, 0x2e, 0x41, 0x6e, 0x74, 0x69, 0x4b, 0x6c, 0x65, 0x70, 0x74, 0x6f, 0x53, 0x69, 0x67, - 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x1a, 0x61, - 0x6e, 0x74, 0x69, 0x4b, 0x6c, 0x65, 0x70, 0x74, 0x6f, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x43, - 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x19, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x70, 0x6b, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x17, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x50, 0x6b, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x12, 0x39, 0x0a, 0x19, 0x73, 0x69, 0x6c, 0x65, 0x6e, 0x74, 0x5f, - 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x6c, 0x65, 0x71, 0x5f, 0x70, 0x72, 0x6f, - 0x6f, 0x66, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x16, 0x73, 0x69, 0x6c, 0x65, 0x6e, 0x74, - 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x6c, 0x65, 0x71, 0x50, 0x72, 0x6f, 0x6f, 0x66, - 0x22, 0x82, 0x01, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x4e, 0x50, - 0x55, 0x54, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4f, 0x55, 0x54, 0x50, 0x55, 0x54, 0x10, 0x01, - 0x12, 0x08, 0x0a, 0x04, 0x44, 0x4f, 0x4e, 0x45, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x50, 0x52, - 0x45, 0x56, 0x54, 0x58, 0x5f, 0x49, 0x4e, 0x49, 0x54, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x50, - 0x52, 0x45, 0x56, 0x54, 0x58, 0x5f, 0x49, 0x4e, 0x50, 0x55, 0x54, 0x10, 0x04, 0x12, 0x11, 0x0a, - 0x0d, 0x50, 0x52, 0x45, 0x56, 0x54, 0x58, 0x5f, 0x4f, 0x55, 0x54, 0x50, 0x55, 0x54, 0x10, 0x05, - 0x12, 0x0e, 0x0a, 0x0a, 0x48, 0x4f, 0x53, 0x54, 0x5f, 0x4e, 0x4f, 0x4e, 0x43, 0x45, 0x10, 0x06, - 0x12, 0x13, 0x0a, 0x0f, 0x50, 0x41, 0x59, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x51, 0x55, - 0x45, 0x53, 0x54, 0x10, 0x07, 0x22, 0xce, 0x02, 0x0a, 0x13, 0x42, 0x54, 0x43, 0x53, 0x69, 0x67, - 0x6e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, - 0x0b, 0x70, 0x72, 0x65, 0x76, 0x4f, 0x75, 0x74, 0x48, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x76, 0x4f, 0x75, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, - 0x22, 0x0a, 0x0c, 0x70, 0x72, 0x65, 0x76, 0x4f, 0x75, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x76, 0x4f, 0x75, 0x74, 0x49, 0x6e, - 0x64, 0x65, 0x78, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x72, 0x65, 0x76, 0x4f, 0x75, 0x74, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x76, 0x4f, - 0x75, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, - 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, - 0x6e, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x70, 0x61, 0x74, 0x68, 0x18, 0x06, - 0x20, 0x03, 0x28, 0x0d, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x70, 0x61, 0x74, 0x68, 0x12, 0x2e, 0x0a, - 0x13, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x67, 0x0a, - 0x15, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, - 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x73, + 0x30, 0x32, 0x2e, 0x42, 0x54, 0x43, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x57, 0x69, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x70, 0x61, 0x74, 0x68, 0x52, 0x13, 0x6f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x73, 0x22, 0x22, 0x0a, 0x0a, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x55, 0x6e, 0x69, 0x74, + 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x07, 0x0a, + 0x03, 0x53, 0x41, 0x54, 0x10, 0x01, 0x22, 0xc2, 0x04, 0x0a, 0x13, 0x42, 0x54, 0x43, 0x53, 0x69, + 0x67, 0x6e, 0x4e, 0x65, 0x78, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, - 0x78, 0x30, 0x32, 0x2e, 0x41, 0x6e, 0x74, 0x69, 0x4b, 0x6c, 0x65, 0x70, 0x74, 0x6f, 0x48, 0x6f, - 0x73, 0x74, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, - 0x74, 0x52, 0x13, 0x68, 0x6f, 0x73, 0x74, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6d, 0x6d, - 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0xbc, 0x03, 0x0a, 0x14, 0x42, 0x54, 0x43, 0x53, 0x69, - 0x67, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x12, 0x0a, 0x04, 0x6f, 0x75, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x6f, - 0x75, 0x72, 0x73, 0x12, 0x37, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x23, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, - 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x42, 0x54, 0x43, 0x4f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x18, 0x0a, 0x07, - 0x6b, 0x65, 0x79, 0x70, 0x61, 0x74, 0x68, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x07, 0x6b, - 0x65, 0x79, 0x70, 0x61, 0x74, 0x68, 0x12, 0x2e, 0x0a, 0x13, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x11, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x37, 0x0a, 0x15, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, - 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x13, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x88, 0x01, 0x01, 0x12, - 0x5f, 0x0a, 0x0e, 0x73, 0x69, 0x6c, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, - 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, + 0x78, 0x30, 0x32, 0x2e, 0x42, 0x54, 0x43, 0x53, 0x69, 0x67, 0x6e, 0x4e, 0x65, 0x78, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x23, 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x5f, + 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0c, 0x68, 0x61, 0x73, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1c, 0x0a, + 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, + 0x72, 0x65, 0x76, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x09, 0x70, 0x72, 0x65, 0x76, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x73, 0x0a, 0x1d, 0x61, 0x6e, + 0x74, 0x69, 0x5f, 0x6b, 0x6c, 0x65, 0x70, 0x74, 0x6f, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, + 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x30, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, + 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x41, 0x6e, 0x74, 0x69, 0x4b, 0x6c, 0x65, + 0x70, 0x74, 0x6f, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, + 0x65, 0x6e, 0x74, 0x52, 0x1a, 0x61, 0x6e, 0x74, 0x69, 0x4b, 0x6c, 0x65, 0x70, 0x74, 0x6f, 0x53, + 0x69, 0x67, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x12, + 0x3a, 0x0a, 0x19, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x75, 0x74, + 0x70, 0x75, 0x74, 0x5f, 0x70, 0x6b, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x17, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x4f, 0x75, 0x74, + 0x70, 0x75, 0x74, 0x50, 0x6b, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x12, 0x39, 0x0a, 0x19, 0x73, + 0x69, 0x6c, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x6c, + 0x65, 0x71, 0x5f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x16, + 0x73, 0x69, 0x6c, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x6c, 0x65, + 0x71, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x22, 0x82, 0x01, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x09, 0x0a, 0x05, 0x49, 0x4e, 0x50, 0x55, 0x54, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4f, 0x55, + 0x54, 0x50, 0x55, 0x54, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x4f, 0x4e, 0x45, 0x10, 0x02, + 0x12, 0x0f, 0x0a, 0x0b, 0x50, 0x52, 0x45, 0x56, 0x54, 0x58, 0x5f, 0x49, 0x4e, 0x49, 0x54, 0x10, + 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x52, 0x45, 0x56, 0x54, 0x58, 0x5f, 0x49, 0x4e, 0x50, 0x55, + 0x54, 0x10, 0x04, 0x12, 0x11, 0x0a, 0x0d, 0x50, 0x52, 0x45, 0x56, 0x54, 0x58, 0x5f, 0x4f, 0x55, + 0x54, 0x50, 0x55, 0x54, 0x10, 0x05, 0x12, 0x0e, 0x0a, 0x0a, 0x48, 0x4f, 0x53, 0x54, 0x5f, 0x4e, + 0x4f, 0x4e, 0x43, 0x45, 0x10, 0x06, 0x12, 0x13, 0x0a, 0x0f, 0x50, 0x41, 0x59, 0x4d, 0x45, 0x4e, + 0x54, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x07, 0x22, 0xce, 0x02, 0x0a, 0x13, + 0x42, 0x54, 0x43, 0x53, 0x69, 0x67, 0x6e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x76, 0x4f, 0x75, 0x74, 0x48, 0x61, + 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x76, 0x4f, 0x75, + 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x72, 0x65, 0x76, 0x4f, 0x75, 0x74, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x70, 0x72, 0x65, + 0x76, 0x4f, 0x75, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x72, 0x65, + 0x76, 0x4f, 0x75, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x0c, 0x70, 0x72, 0x65, 0x76, 0x4f, 0x75, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1a, 0x0a, + 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, + 0x70, 0x61, 0x74, 0x68, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x70, + 0x61, 0x74, 0x68, 0x12, 0x2e, 0x0a, 0x13, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x11, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x12, 0x67, 0x0a, 0x15, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, + 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, + 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x41, 0x6e, 0x74, 0x69, 0x4b, 0x6c, + 0x65, 0x70, 0x74, 0x6f, 0x48, 0x6f, 0x73, 0x74, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6d, + 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x13, 0x68, 0x6f, 0x73, 0x74, 0x4e, 0x6f, 0x6e, + 0x63, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x9d, 0x04, 0x0a, + 0x14, 0x42, 0x54, 0x43, 0x53, 0x69, 0x67, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6f, 0x75, 0x72, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x04, 0x6f, 0x75, 0x72, 0x73, 0x12, 0x37, 0x0a, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x42, - 0x54, 0x43, 0x53, 0x69, 0x67, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x2e, 0x53, 0x69, 0x6c, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, - 0x74, 0x52, 0x0d, 0x73, 0x69, 0x6c, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, - 0x1a, 0x29, 0x0a, 0x0d, 0x53, 0x69, 0x6c, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, - 0x74, 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, 0x42, 0x18, 0x0a, 0x16, 0x5f, + 0x54, 0x43, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x70, 0x61, 0x74, 0x68, 0x18, 0x05, 0x20, + 0x03, 0x28, 0x0d, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x70, 0x61, 0x74, 0x68, 0x12, 0x2e, 0x0a, 0x13, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x37, 0x0a, 0x15, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, - 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0xb6, 0x01, 0x0a, 0x1b, 0x42, 0x54, 0x43, 0x53, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x04, 0x63, 0x6f, 0x69, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x42, 0x54, 0x43, 0x43, 0x6f, - 0x69, 0x6e, 0x52, 0x04, 0x63, 0x6f, 0x69, 0x6e, 0x12, 0x4a, 0x0a, 0x0d, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x25, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, - 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x42, 0x54, 0x43, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x70, 0x61, 0x74, 0x68, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x70, 0x61, 0x74, 0x68, 0x22, 0x0c, - 0x0a, 0x0a, 0x42, 0x54, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0x7b, 0x0a, 0x22, - 0x42, 0x54, 0x43, 0x49, 0x73, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x55, 0x0a, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, - 0x42, 0x54, 0x43, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x72, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4a, 0x0a, 0x23, 0x42, 0x54, 0x43, - 0x49, 0x73, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, - 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x73, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x65, 0x64, 0x22, 0x9a, 0x02, 0x0a, 0x1e, 0x42, 0x54, 0x43, 0x52, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x55, 0x0a, 0x0c, 0x72, 0x65, 0x67, 0x69, - 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, - 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, - 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x42, 0x54, 0x43, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x5a, 0x0a, 0x09, 0x78, 0x70, 0x75, 0x62, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3d, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, - 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x42, 0x54, - 0x43, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x58, 0x50, 0x75, - 0x62, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x78, 0x70, 0x75, 0x62, 0x54, 0x79, 0x70, 0x65, 0x22, - 0x31, 0x0a, 0x08, 0x58, 0x50, 0x75, 0x62, 0x54, 0x79, 0x70, 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x41, - 0x55, 0x54, 0x4f, 0x5f, 0x45, 0x4c, 0x45, 0x43, 0x54, 0x52, 0x55, 0x4d, 0x10, 0x00, 0x12, 0x12, - 0x0a, 0x0e, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x58, 0x50, 0x55, 0x42, 0x5f, 0x54, 0x50, 0x55, 0x42, - 0x10, 0x01, 0x22, 0x8c, 0x01, 0x0a, 0x14, 0x42, 0x54, 0x43, 0x50, 0x72, 0x65, 0x76, 0x54, 0x78, - 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x6d, 0x5f, 0x69, 0x6e, 0x70, - 0x75, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x6e, 0x75, 0x6d, 0x49, 0x6e, - 0x70, 0x75, 0x74, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x75, 0x6d, 0x5f, 0x6f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x6e, 0x75, 0x6d, 0x4f, 0x75, - 0x74, 0x70, 0x75, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x74, 0x69, 0x6d, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x74, 0x69, 0x6d, - 0x65, 0x22, 0xa8, 0x01, 0x0a, 0x15, 0x42, 0x54, 0x43, 0x50, 0x72, 0x65, 0x76, 0x54, 0x78, 0x49, - 0x6e, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x0d, 0x70, - 0x72, 0x65, 0x76, 0x5f, 0x6f, 0x75, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x76, 0x4f, 0x75, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, - 0x24, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x76, 0x5f, 0x6f, 0x75, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, - 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x76, 0x4f, 0x75, 0x74, - 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x29, 0x0a, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x5f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x0f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x53, 0x0a, 0x16, - 0x42, 0x54, 0x43, 0x50, 0x72, 0x65, 0x76, 0x54, 0x78, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0d, - 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x53, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x22, 0xf1, 0x02, 0x0a, 0x18, 0x42, 0x54, 0x43, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, - 0x0a, 0x0e, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, - 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x49, 0x0a, 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, - 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x42, 0x54, 0x43, 0x50, - 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, - 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, - 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x74, 0x6f, - 0x74, 0x61, 0x6c, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x8b, 0x01, 0x0a, 0x04, 0x4d, 0x65, 0x6d, 0x6f, - 0x12, 0x5b, 0x0a, 0x09, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x42, 0x54, 0x43, 0x50, 0x61, - 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x4d, 0x65, 0x6d, - 0x6f, 0x48, 0x00, 0x52, 0x08, 0x74, 0x65, 0x78, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x1a, 0x1e, 0x0a, - 0x08, 0x54, 0x65, 0x78, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x6f, 0x74, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x6f, 0x74, 0x65, 0x42, 0x06, 0x0a, - 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x22, 0x9c, 0x02, 0x0a, 0x15, 0x42, 0x54, 0x43, 0x53, 0x69, 0x67, - 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x31, 0x0a, 0x04, 0x63, 0x6f, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x13, 0x70, + 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x64, + 0x65, 0x78, 0x88, 0x01, 0x01, 0x12, 0x5f, 0x0a, 0x0e, 0x73, 0x69, 0x6c, 0x65, 0x6e, 0x74, 0x5f, + 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, - 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x42, 0x54, 0x43, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x04, 0x63, 0x6f, - 0x69, 0x6e, 0x12, 0x55, 0x0a, 0x0d, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x5f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x73, 0x68, 0x69, 0x66, - 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, - 0x2e, 0x42, 0x54, 0x43, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x57, 0x69, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x70, 0x61, 0x74, 0x68, 0x52, 0x0c, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x67, 0x0a, 0x15, 0x68, - 0x6f, 0x73, 0x74, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, - 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x73, 0x68, 0x69, + 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x42, 0x54, 0x43, 0x53, 0x69, 0x67, 0x6e, 0x4f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x69, 0x6c, 0x65, 0x6e, 0x74, + 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0d, 0x73, 0x69, 0x6c, 0x65, 0x6e, 0x74, 0x50, + 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x1a, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x5f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x17, 0x6f, 0x75, + 0x74, 0x70, 0x75, 0x74, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x88, 0x01, 0x01, 0x1a, 0x29, 0x0a, 0x0d, 0x53, 0x69, 0x6c, 0x65, + 0x6e, 0x74, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 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, 0x42, 0x18, 0x0a, 0x16, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x1d, 0x0a, + 0x1b, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0xb6, 0x01, 0x0a, + 0x1b, 0x42, 0x54, 0x43, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x04, + 0x63, 0x6f, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, - 0x32, 0x2e, 0x41, 0x6e, 0x74, 0x69, 0x4b, 0x6c, 0x65, 0x70, 0x74, 0x6f, 0x48, 0x6f, 0x73, 0x74, - 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, - 0x13, 0x68, 0x6f, 0x73, 0x74, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, - 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x36, 0x0a, 0x16, 0x42, 0x54, 0x43, 0x53, 0x69, 0x67, 0x6e, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 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, - 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x8a, 0x06, 0x0a, - 0x0a, 0x42, 0x54, 0x43, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x79, 0x0a, 0x1b, 0x69, - 0x73, 0x5f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, - 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x38, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, - 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x42, 0x54, 0x43, 0x49, 0x73, 0x53, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, - 0x72, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x18, 0x69, 0x73, - 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x67, 0x69, - 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x12, 0x6c, 0x0a, 0x16, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x65, 0x72, 0x5f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, + 0x32, 0x2e, 0x42, 0x54, 0x43, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x04, 0x63, 0x6f, 0x69, 0x6e, 0x12, + 0x4a, 0x0a, 0x0d, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x42, 0x54, - 0x43, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x14, - 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4d, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x76, 0x74, 0x78, 0x5f, 0x69, - 0x6e, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x73, 0x68, 0x69, 0x66, - 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, - 0x2e, 0x42, 0x54, 0x43, 0x50, 0x72, 0x65, 0x76, 0x54, 0x78, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x76, 0x74, 0x78, 0x49, - 0x6e, 0x69, 0x74, 0x12, 0x50, 0x0a, 0x0c, 0x70, 0x72, 0x65, 0x76, 0x74, 0x78, 0x5f, 0x69, 0x6e, - 0x70, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x73, 0x68, 0x69, 0x66, - 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, - 0x2e, 0x42, 0x54, 0x43, 0x50, 0x72, 0x65, 0x76, 0x54, 0x78, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x76, 0x74, 0x78, - 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x53, 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x76, 0x74, 0x78, 0x5f, - 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x73, - 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, - 0x78, 0x30, 0x32, 0x2e, 0x42, 0x54, 0x43, 0x50, 0x72, 0x65, 0x76, 0x54, 0x78, 0x4f, 0x75, 0x74, - 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x70, 0x72, - 0x65, 0x76, 0x74, 0x78, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x50, 0x0a, 0x0c, 0x73, 0x69, - 0x67, 0x6e, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2b, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, - 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x42, 0x54, 0x43, 0x53, 0x69, 0x67, 0x6e, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, - 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x65, 0x0a, 0x14, - 0x61, 0x6e, 0x74, 0x69, 0x6b, 0x6c, 0x65, 0x70, 0x74, 0x6f, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x73, 0x68, 0x69, - 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, - 0x32, 0x2e, 0x41, 0x6e, 0x74, 0x69, 0x4b, 0x6c, 0x65, 0x70, 0x74, 0x6f, 0x53, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x13, - 0x61, 0x6e, 0x74, 0x69, 0x6b, 0x6c, 0x65, 0x70, 0x74, 0x6f, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x12, 0x59, 0x0a, 0x0f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x73, - 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, - 0x78, 0x30, 0x32, 0x2e, 0x42, 0x54, 0x43, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0e, - 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x09, - 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xe6, 0x03, 0x0a, 0x0b, 0x42, 0x54, - 0x43, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x73, 0x75, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x73, 0x68, 0x69, - 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, - 0x32, 0x2e, 0x42, 0x54, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x07, - 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x7a, 0x0a, 0x1b, 0x69, 0x73, 0x5f, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x72, 0x65, 0x67, 0x69, - 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x73, - 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, - 0x78, 0x30, 0x32, 0x2e, 0x42, 0x54, 0x43, 0x49, 0x73, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, + 0x43, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x6b, + 0x65, 0x79, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x07, 0x6b, 0x65, + 0x79, 0x70, 0x61, 0x74, 0x68, 0x22, 0x0c, 0x0a, 0x0a, 0x42, 0x54, 0x43, 0x53, 0x75, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x22, 0x7b, 0x0a, 0x22, 0x42, 0x54, 0x43, 0x49, 0x73, 0x53, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x55, 0x0a, 0x0c, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x31, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, + 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x42, 0x54, 0x43, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0x4a, 0x0a, 0x23, 0x42, 0x54, 0x43, 0x49, 0x73, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x18, 0x69, 0x73, 0x53, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, - 0x72, 0x65, 0x64, 0x12, 0x48, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x6e, 0x65, 0x78, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, - 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x42, 0x54, - 0x43, 0x53, 0x69, 0x67, 0x6e, 0x4e, 0x65, 0x78, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x48, 0x00, 0x52, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x4e, 0x65, 0x78, 0x74, 0x12, 0x51, 0x0a, - 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x73, 0x5f, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, + 0x69, 0x73, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x22, 0x9a, 0x02, 0x0a, + 0x1e, 0x42, 0x54, 0x43, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x55, 0x0a, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x42, 0x54, 0x43, + 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x5a, 0x0a, 0x09, 0x78, 0x70, + 0x75, 0x62, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3d, 0x2e, + 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, + 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x42, 0x54, 0x43, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x2e, 0x58, 0x50, 0x75, 0x62, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x78, 0x70, + 0x75, 0x62, 0x54, 0x79, 0x70, 0x65, 0x22, 0x31, 0x0a, 0x08, 0x58, 0x50, 0x75, 0x62, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x45, 0x4c, 0x45, 0x43, 0x54, + 0x52, 0x55, 0x4d, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x58, 0x50, + 0x55, 0x42, 0x5f, 0x54, 0x50, 0x55, 0x42, 0x10, 0x01, 0x22, 0x8c, 0x01, 0x0a, 0x14, 0x42, 0x54, + 0x43, 0x50, 0x72, 0x65, 0x76, 0x54, 0x78, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, + 0x6e, 0x75, 0x6d, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x09, 0x6e, 0x75, 0x6d, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, + 0x75, 0x6d, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x0a, 0x6e, 0x75, 0x6d, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, + 0x6c, 0x6f, 0x63, 0x6b, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, + 0x6c, 0x6f, 0x63, 0x6b, 0x74, 0x69, 0x6d, 0x65, 0x22, 0xa8, 0x01, 0x0a, 0x15, 0x42, 0x54, 0x43, + 0x50, 0x72, 0x65, 0x76, 0x54, 0x78, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x22, 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x76, 0x5f, 0x6f, 0x75, 0x74, 0x5f, 0x68, + 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x76, 0x4f, + 0x75, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x24, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x76, 0x5f, 0x6f, + 0x75, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, + 0x70, 0x72, 0x65, 0x76, 0x4f, 0x75, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x29, 0x0a, 0x10, + 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, + 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, + 0x6e, 0x63, 0x65, 0x22, 0x53, 0x0a, 0x16, 0x42, 0x54, 0x43, 0x50, 0x72, 0x65, 0x76, 0x54, 0x78, + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x70, 0x75, 0x62, 0x6b, + 0x65, 0x79, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x22, 0xf1, 0x02, 0x0a, 0x18, 0x42, 0x54, 0x43, + 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, + 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, + 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x49, 0x0a, 0x05, + 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x73, 0x68, + 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, + 0x30, 0x32, 0x2e, 0x42, 0x54, 0x43, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, + 0x52, 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x21, 0x0a, + 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x8b, + 0x01, 0x0a, 0x04, 0x4d, 0x65, 0x6d, 0x6f, 0x12, 0x5b, 0x0a, 0x09, 0x74, 0x65, 0x78, 0x74, 0x5f, + 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x73, 0x68, 0x69, + 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, + 0x32, 0x2e, 0x42, 0x54, 0x43, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x2e, + 0x54, 0x65, 0x78, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x48, 0x00, 0x52, 0x08, 0x74, 0x65, 0x78, 0x74, + 0x4d, 0x65, 0x6d, 0x6f, 0x1a, 0x1e, 0x0a, 0x08, 0x54, 0x65, 0x78, 0x74, 0x4d, 0x65, 0x6d, 0x6f, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x6f, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x6f, 0x74, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x22, 0x9c, 0x02, 0x0a, + 0x15, 0x42, 0x54, 0x43, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x04, 0x63, 0x6f, 0x69, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, + 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x42, 0x54, 0x43, 0x43, + 0x6f, 0x69, 0x6e, 0x52, 0x04, 0x63, 0x6f, 0x69, 0x6e, 0x12, 0x55, 0x0a, 0x0d, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x30, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, + 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x42, 0x54, 0x43, 0x53, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x57, 0x69, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x70, 0x61, + 0x74, 0x68, 0x52, 0x0c, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6d, + 0x73, 0x67, 0x12, 0x67, 0x0a, 0x15, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x65, + 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x33, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, + 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x41, 0x6e, 0x74, 0x69, 0x4b, 0x6c, 0x65, + 0x70, 0x74, 0x6f, 0x48, 0x6f, 0x73, 0x74, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x13, 0x68, 0x6f, 0x73, 0x74, 0x4e, 0x6f, 0x6e, 0x63, + 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x36, 0x0a, 0x16, 0x42, + 0x54, 0x43, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 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, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x22, 0x8a, 0x06, 0x0a, 0x0a, 0x42, 0x54, 0x43, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x79, 0x0a, 0x1b, 0x69, 0x73, 0x5f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, + 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x42, + 0x54, 0x43, 0x49, 0x73, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x48, 0x00, 0x52, 0x18, 0x69, 0x73, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x12, 0x6c, 0x0a, + 0x16, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, + 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, + 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x42, 0x54, 0x43, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x14, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4d, 0x0a, 0x0b, 0x70, + 0x72, 0x65, 0x76, 0x74, 0x78, 0x5f, 0x69, 0x6e, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2a, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, + 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x42, 0x54, 0x43, 0x50, 0x72, 0x65, 0x76, 0x54, + 0x78, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0a, + 0x70, 0x72, 0x65, 0x76, 0x74, 0x78, 0x49, 0x6e, 0x69, 0x74, 0x12, 0x50, 0x0a, 0x0c, 0x70, 0x72, + 0x65, 0x76, 0x74, 0x78, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2b, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, + 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x42, 0x54, 0x43, 0x50, 0x72, 0x65, 0x76, 0x54, + 0x78, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, + 0x0b, 0x70, 0x72, 0x65, 0x76, 0x74, 0x78, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x53, 0x0a, 0x0d, + 0x70, 0x72, 0x65, 0x76, 0x74, 0x78, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x42, 0x54, 0x43, 0x53, 0x69, - 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x12, 0x74, 0x0a, 0x1c, 0x61, 0x6e, 0x74, 0x69, 0x6b, 0x6c, 0x65, 0x70, 0x74, 0x6f, 0x5f, 0x73, - 0x69, 0x67, 0x6e, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, - 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x41, 0x6e, - 0x74, 0x69, 0x4b, 0x6c, 0x65, 0x70, 0x74, 0x6f, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x43, 0x6f, - 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x1a, 0x61, 0x6e, 0x74, 0x69, - 0x6b, 0x6c, 0x65, 0x70, 0x74, 0x6f, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x6d, - 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x2a, 0x2f, 0x0a, 0x07, 0x42, 0x54, 0x43, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x07, 0x0a, - 0x03, 0x42, 0x54, 0x43, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x42, 0x54, 0x43, 0x10, 0x01, - 0x12, 0x07, 0x0a, 0x03, 0x4c, 0x54, 0x43, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x4c, 0x54, - 0x43, 0x10, 0x03, 0x2a, 0x52, 0x0a, 0x0d, 0x42, 0x54, 0x43, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, - 0x00, 0x12, 0x09, 0x0a, 0x05, 0x50, 0x32, 0x50, 0x4b, 0x48, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, - 0x50, 0x32, 0x53, 0x48, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x32, 0x57, 0x50, 0x4b, 0x48, - 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x50, 0x32, 0x57, 0x53, 0x48, 0x10, 0x04, 0x12, 0x08, 0x0a, - 0x04, 0x50, 0x32, 0x54, 0x52, 0x10, 0x05, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x42, 0x54, 0x43, 0x50, 0x72, + 0x65, 0x76, 0x54, 0x78, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x48, 0x00, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x76, 0x74, 0x78, 0x4f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x12, 0x50, 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, + 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x42, + 0x54, 0x43, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x12, 0x65, 0x0a, 0x14, 0x61, 0x6e, 0x74, 0x69, 0x6b, 0x6c, 0x65, 0x70, 0x74, + 0x6f, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x30, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, + 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x41, 0x6e, 0x74, 0x69, 0x4b, 0x6c, 0x65, + 0x70, 0x74, 0x6f, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x13, 0x61, 0x6e, 0x74, 0x69, 0x6b, 0x6c, 0x65, 0x70, 0x74, + 0x6f, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x59, 0x0a, 0x0f, 0x70, 0x61, + 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x42, 0x54, 0x43, 0x50, 0x61, + 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x22, 0xe6, 0x03, 0x0a, 0x0b, 0x42, 0x54, 0x43, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x3c, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x20, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, + 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x42, 0x54, 0x43, 0x53, 0x75, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x7a, + 0x0a, 0x1b, 0x69, 0x73, 0x5f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x42, 0x54, 0x43, 0x49, 0x73, + 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, + 0x52, 0x18, 0x69, 0x73, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x12, 0x48, 0x0a, 0x09, 0x73, 0x69, + 0x67, 0x6e, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, + 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, + 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x42, 0x54, 0x43, 0x53, 0x69, 0x67, 0x6e, 0x4e, 0x65, 0x78, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x08, 0x73, 0x69, 0x67, 0x6e, + 0x4e, 0x65, 0x78, 0x74, 0x12, 0x51, 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x73, 0x68, 0x69, + 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, + 0x32, 0x2e, 0x42, 0x54, 0x43, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x69, 0x67, 0x6e, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x74, 0x0a, 0x1c, 0x61, 0x6e, 0x74, 0x69, 0x6b, + 0x6c, 0x65, 0x70, 0x74, 0x6f, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6d, + 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, + 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, + 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x41, 0x6e, 0x74, 0x69, 0x4b, 0x6c, 0x65, 0x70, 0x74, 0x6f, 0x53, + 0x69, 0x67, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x48, + 0x00, 0x52, 0x1a, 0x61, 0x6e, 0x74, 0x69, 0x6b, 0x6c, 0x65, 0x70, 0x74, 0x6f, 0x53, 0x69, 0x67, + 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x0a, 0x0a, + 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x39, 0x0a, 0x07, 0x42, 0x54, 0x43, + 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x07, 0x0a, 0x03, 0x42, 0x54, 0x43, 0x10, 0x00, 0x12, 0x08, 0x0a, + 0x04, 0x54, 0x42, 0x54, 0x43, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x4c, 0x54, 0x43, 0x10, 0x02, + 0x12, 0x08, 0x0a, 0x04, 0x54, 0x4c, 0x54, 0x43, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x52, 0x42, + 0x54, 0x43, 0x10, 0x04, 0x2a, 0x52, 0x0a, 0x0d, 0x42, 0x54, 0x43, 0x4f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, + 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x50, 0x32, 0x50, 0x4b, 0x48, 0x10, 0x01, 0x12, 0x08, 0x0a, + 0x04, 0x50, 0x32, 0x53, 0x48, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x32, 0x57, 0x50, 0x4b, + 0x48, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x50, 0x32, 0x57, 0x53, 0x48, 0x10, 0x04, 0x12, 0x08, + 0x0a, 0x04, 0x50, 0x32, 0x54, 0x52, 0x10, 0x05, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2845,42 +2886,43 @@ var file_btc_proto_depIdxs = []int32{ 0, // 7: shiftcrypto.bitbox02.BTCSignInitRequest.coin:type_name -> shiftcrypto.bitbox02.BTCCoin 10, // 8: shiftcrypto.bitbox02.BTCSignInitRequest.script_configs:type_name -> shiftcrypto.bitbox02.BTCScriptConfigWithKeypath 5, // 9: shiftcrypto.bitbox02.BTCSignInitRequest.format_unit:type_name -> shiftcrypto.bitbox02.BTCSignInitRequest.FormatUnit - 6, // 10: shiftcrypto.bitbox02.BTCSignNextResponse.type:type_name -> shiftcrypto.bitbox02.BTCSignNextResponse.Type - 33, // 11: shiftcrypto.bitbox02.BTCSignNextResponse.anti_klepto_signer_commitment:type_name -> shiftcrypto.bitbox02.AntiKleptoSignerCommitment - 34, // 12: shiftcrypto.bitbox02.BTCSignInputRequest.host_nonce_commitment:type_name -> shiftcrypto.bitbox02.AntiKleptoHostNonceCommitment - 1, // 13: shiftcrypto.bitbox02.BTCSignOutputRequest.type:type_name -> shiftcrypto.bitbox02.BTCOutputType - 30, // 14: shiftcrypto.bitbox02.BTCSignOutputRequest.silent_payment:type_name -> shiftcrypto.bitbox02.BTCSignOutputRequest.SilentPayment - 0, // 15: shiftcrypto.bitbox02.BTCScriptConfigRegistration.coin:type_name -> shiftcrypto.bitbox02.BTCCoin - 8, // 16: shiftcrypto.bitbox02.BTCScriptConfigRegistration.script_config:type_name -> shiftcrypto.bitbox02.BTCScriptConfig - 15, // 17: shiftcrypto.bitbox02.BTCIsScriptConfigRegisteredRequest.registration:type_name -> shiftcrypto.bitbox02.BTCScriptConfigRegistration - 15, // 18: shiftcrypto.bitbox02.BTCRegisterScriptConfigRequest.registration:type_name -> shiftcrypto.bitbox02.BTCScriptConfigRegistration - 7, // 19: shiftcrypto.bitbox02.BTCRegisterScriptConfigRequest.xpub_type:type_name -> shiftcrypto.bitbox02.BTCRegisterScriptConfigRequest.XPubType - 31, // 20: shiftcrypto.bitbox02.BTCPaymentRequestRequest.memos:type_name -> shiftcrypto.bitbox02.BTCPaymentRequestRequest.Memo - 0, // 21: shiftcrypto.bitbox02.BTCSignMessageRequest.coin:type_name -> shiftcrypto.bitbox02.BTCCoin - 10, // 22: shiftcrypto.bitbox02.BTCSignMessageRequest.script_config:type_name -> shiftcrypto.bitbox02.BTCScriptConfigWithKeypath - 34, // 23: shiftcrypto.bitbox02.BTCSignMessageRequest.host_nonce_commitment:type_name -> shiftcrypto.bitbox02.AntiKleptoHostNonceCommitment - 17, // 24: shiftcrypto.bitbox02.BTCRequest.is_script_config_registered:type_name -> shiftcrypto.bitbox02.BTCIsScriptConfigRegisteredRequest - 19, // 25: shiftcrypto.bitbox02.BTCRequest.register_script_config:type_name -> shiftcrypto.bitbox02.BTCRegisterScriptConfigRequest - 20, // 26: shiftcrypto.bitbox02.BTCRequest.prevtx_init:type_name -> shiftcrypto.bitbox02.BTCPrevTxInitRequest - 21, // 27: shiftcrypto.bitbox02.BTCRequest.prevtx_input:type_name -> shiftcrypto.bitbox02.BTCPrevTxInputRequest - 22, // 28: shiftcrypto.bitbox02.BTCRequest.prevtx_output:type_name -> shiftcrypto.bitbox02.BTCPrevTxOutputRequest - 24, // 29: shiftcrypto.bitbox02.BTCRequest.sign_message:type_name -> shiftcrypto.bitbox02.BTCSignMessageRequest - 35, // 30: shiftcrypto.bitbox02.BTCRequest.antiklepto_signature:type_name -> shiftcrypto.bitbox02.AntiKleptoSignatureRequest - 23, // 31: shiftcrypto.bitbox02.BTCRequest.payment_request:type_name -> shiftcrypto.bitbox02.BTCPaymentRequestRequest - 16, // 32: shiftcrypto.bitbox02.BTCResponse.success:type_name -> shiftcrypto.bitbox02.BTCSuccess - 18, // 33: shiftcrypto.bitbox02.BTCResponse.is_script_config_registered:type_name -> shiftcrypto.bitbox02.BTCIsScriptConfigRegisteredResponse - 12, // 34: shiftcrypto.bitbox02.BTCResponse.sign_next:type_name -> shiftcrypto.bitbox02.BTCSignNextResponse - 25, // 35: shiftcrypto.bitbox02.BTCResponse.sign_message:type_name -> shiftcrypto.bitbox02.BTCSignMessageResponse - 33, // 36: shiftcrypto.bitbox02.BTCResponse.antiklepto_signer_commitment:type_name -> shiftcrypto.bitbox02.AntiKleptoSignerCommitment - 36, // 37: shiftcrypto.bitbox02.BTCScriptConfig.Multisig.xpubs:type_name -> shiftcrypto.bitbox02.XPub - 3, // 38: shiftcrypto.bitbox02.BTCScriptConfig.Multisig.script_type:type_name -> shiftcrypto.bitbox02.BTCScriptConfig.Multisig.ScriptType - 37, // 39: shiftcrypto.bitbox02.BTCScriptConfig.Policy.keys:type_name -> shiftcrypto.bitbox02.KeyOriginInfo - 32, // 40: shiftcrypto.bitbox02.BTCPaymentRequestRequest.Memo.text_memo:type_name -> shiftcrypto.bitbox02.BTCPaymentRequestRequest.Memo.TextMemo - 41, // [41:41] is the sub-list for method output_type - 41, // [41:41] is the sub-list for method input_type - 41, // [41:41] is the sub-list for extension type_name - 41, // [41:41] is the sub-list for extension extendee - 0, // [0:41] is the sub-list for field type_name + 10, // 10: shiftcrypto.bitbox02.BTCSignInitRequest.output_script_configs:type_name -> shiftcrypto.bitbox02.BTCScriptConfigWithKeypath + 6, // 11: shiftcrypto.bitbox02.BTCSignNextResponse.type:type_name -> shiftcrypto.bitbox02.BTCSignNextResponse.Type + 33, // 12: shiftcrypto.bitbox02.BTCSignNextResponse.anti_klepto_signer_commitment:type_name -> shiftcrypto.bitbox02.AntiKleptoSignerCommitment + 34, // 13: shiftcrypto.bitbox02.BTCSignInputRequest.host_nonce_commitment:type_name -> shiftcrypto.bitbox02.AntiKleptoHostNonceCommitment + 1, // 14: shiftcrypto.bitbox02.BTCSignOutputRequest.type:type_name -> shiftcrypto.bitbox02.BTCOutputType + 30, // 15: shiftcrypto.bitbox02.BTCSignOutputRequest.silent_payment:type_name -> shiftcrypto.bitbox02.BTCSignOutputRequest.SilentPayment + 0, // 16: shiftcrypto.bitbox02.BTCScriptConfigRegistration.coin:type_name -> shiftcrypto.bitbox02.BTCCoin + 8, // 17: shiftcrypto.bitbox02.BTCScriptConfigRegistration.script_config:type_name -> shiftcrypto.bitbox02.BTCScriptConfig + 15, // 18: shiftcrypto.bitbox02.BTCIsScriptConfigRegisteredRequest.registration:type_name -> shiftcrypto.bitbox02.BTCScriptConfigRegistration + 15, // 19: shiftcrypto.bitbox02.BTCRegisterScriptConfigRequest.registration:type_name -> shiftcrypto.bitbox02.BTCScriptConfigRegistration + 7, // 20: shiftcrypto.bitbox02.BTCRegisterScriptConfigRequest.xpub_type:type_name -> shiftcrypto.bitbox02.BTCRegisterScriptConfigRequest.XPubType + 31, // 21: shiftcrypto.bitbox02.BTCPaymentRequestRequest.memos:type_name -> shiftcrypto.bitbox02.BTCPaymentRequestRequest.Memo + 0, // 22: shiftcrypto.bitbox02.BTCSignMessageRequest.coin:type_name -> shiftcrypto.bitbox02.BTCCoin + 10, // 23: shiftcrypto.bitbox02.BTCSignMessageRequest.script_config:type_name -> shiftcrypto.bitbox02.BTCScriptConfigWithKeypath + 34, // 24: shiftcrypto.bitbox02.BTCSignMessageRequest.host_nonce_commitment:type_name -> shiftcrypto.bitbox02.AntiKleptoHostNonceCommitment + 17, // 25: shiftcrypto.bitbox02.BTCRequest.is_script_config_registered:type_name -> shiftcrypto.bitbox02.BTCIsScriptConfigRegisteredRequest + 19, // 26: shiftcrypto.bitbox02.BTCRequest.register_script_config:type_name -> shiftcrypto.bitbox02.BTCRegisterScriptConfigRequest + 20, // 27: shiftcrypto.bitbox02.BTCRequest.prevtx_init:type_name -> shiftcrypto.bitbox02.BTCPrevTxInitRequest + 21, // 28: shiftcrypto.bitbox02.BTCRequest.prevtx_input:type_name -> shiftcrypto.bitbox02.BTCPrevTxInputRequest + 22, // 29: shiftcrypto.bitbox02.BTCRequest.prevtx_output:type_name -> shiftcrypto.bitbox02.BTCPrevTxOutputRequest + 24, // 30: shiftcrypto.bitbox02.BTCRequest.sign_message:type_name -> shiftcrypto.bitbox02.BTCSignMessageRequest + 35, // 31: shiftcrypto.bitbox02.BTCRequest.antiklepto_signature:type_name -> shiftcrypto.bitbox02.AntiKleptoSignatureRequest + 23, // 32: shiftcrypto.bitbox02.BTCRequest.payment_request:type_name -> shiftcrypto.bitbox02.BTCPaymentRequestRequest + 16, // 33: shiftcrypto.bitbox02.BTCResponse.success:type_name -> shiftcrypto.bitbox02.BTCSuccess + 18, // 34: shiftcrypto.bitbox02.BTCResponse.is_script_config_registered:type_name -> shiftcrypto.bitbox02.BTCIsScriptConfigRegisteredResponse + 12, // 35: shiftcrypto.bitbox02.BTCResponse.sign_next:type_name -> shiftcrypto.bitbox02.BTCSignNextResponse + 25, // 36: shiftcrypto.bitbox02.BTCResponse.sign_message:type_name -> shiftcrypto.bitbox02.BTCSignMessageResponse + 33, // 37: shiftcrypto.bitbox02.BTCResponse.antiklepto_signer_commitment:type_name -> shiftcrypto.bitbox02.AntiKleptoSignerCommitment + 36, // 38: shiftcrypto.bitbox02.BTCScriptConfig.Multisig.xpubs:type_name -> shiftcrypto.bitbox02.XPub + 3, // 39: shiftcrypto.bitbox02.BTCScriptConfig.Multisig.script_type:type_name -> shiftcrypto.bitbox02.BTCScriptConfig.Multisig.ScriptType + 37, // 40: shiftcrypto.bitbox02.BTCScriptConfig.Policy.keys:type_name -> shiftcrypto.bitbox02.KeyOriginInfo + 32, // 41: shiftcrypto.bitbox02.BTCPaymentRequestRequest.Memo.text_memo:type_name -> shiftcrypto.bitbox02.BTCPaymentRequestRequest.Memo.TextMemo + 42, // [42:42] is the sub-list for method output_type + 42, // [42:42] is the sub-list for method input_type + 42, // [42:42] is the sub-list for extension type_name + 42, // [42:42] is the sub-list for extension extendee + 0, // [0:42] is the sub-list for field type_name } func init() { file_btc_proto_init() } diff --git a/api/firmware/messages/btc.proto b/api/firmware/messages/btc.proto index 67db4db..7a49fe4 100644 --- a/api/firmware/messages/btc.proto +++ b/api/firmware/messages/btc.proto @@ -24,6 +24,8 @@ enum BTCCoin { TBTC = 1; LTC = 2; TLTC = 3; + // Regtest + RBTC = 4; }; @@ -113,6 +115,9 @@ message BTCSignInitRequest { } FormatUnit format_unit = 8; bool contains_silent_payment_outputs = 9; + // used script configs for outputs that send to an address of the same keystore, but not + // necessarily the same account (as defined by `script_configs` above). + repeated BTCScriptConfigWithKeypath output_script_configs = 10; } message BTCSignNextResponse { @@ -136,7 +141,7 @@ message BTCSignNextResponse { // Previous tx's input/output index in case of PREV_INPUT or PREV_OUTPUT, for the input at `index`. uint32 prev_index = 5; AntiKleptoSignerCommitment anti_klepto_signer_commitment = 6; - // Generated output. The host *must* verify its correctness using silent_payment_dleq_proof. + // Generated output. The host *must* verify its correctness using `silent_payment_dleq_proof`. bytes generated_output_pkscript = 7; bytes silent_payment_dleq_proof = 8; } @@ -172,12 +177,19 @@ message BTCSignOutputRequest { uint64 value = 3; bytes payload = 4; // if ours is false. Renamed from `hash`. repeated uint32 keypath = 5; // if ours is true - // If ours is true. References a script config from BTCSignInitRequest + // If ours is true and `output_script_config_index` is absent. References a script config from + // BTCSignInitRequest. This allows change output identification and allows us to identify + // non-change outputs to the same account, so we can display this info to the user. uint32 script_config_index = 6; optional uint32 payment_request_index = 7; // If provided, `type` and `payload` is ignored. The generated output pkScript is returned in // BTCSignNextResponse. `contains_silent_payment_outputs` in the init request must be true. SilentPayment silent_payment = 8; + // If ours is true. If set, `script_config_index` is ignored. References an output script config + // from BTCSignInitRequest. This enables verification that an output belongs to the same keystore, + // even if it is from a different account than we spend from, allowing us to display this info to + // the user. + optional uint32 output_script_config_index = 9; } message BTCScriptConfigRegistration { diff --git a/api/firmware/messages/cardano.pb.go b/api/firmware/messages/cardano.pb.go index 6b73916..c1d9f7f 100644 --- a/api/firmware/messages/cardano.pb.go +++ b/api/firmware/messages/cardano.pb.go @@ -80,6 +80,58 @@ func (CardanoNetwork) EnumDescriptor() ([]byte, []int) { return file_cardano_proto_rawDescGZIP(), []int{0} } +type CardanoSignTransactionRequest_Certificate_VoteDelegation_CardanoDRepType int32 + +const ( + CardanoSignTransactionRequest_Certificate_VoteDelegation_KEY_HASH CardanoSignTransactionRequest_Certificate_VoteDelegation_CardanoDRepType = 0 + CardanoSignTransactionRequest_Certificate_VoteDelegation_SCRIPT_HASH CardanoSignTransactionRequest_Certificate_VoteDelegation_CardanoDRepType = 1 + CardanoSignTransactionRequest_Certificate_VoteDelegation_ALWAYS_ABSTAIN CardanoSignTransactionRequest_Certificate_VoteDelegation_CardanoDRepType = 2 + CardanoSignTransactionRequest_Certificate_VoteDelegation_ALWAYS_NO_CONFIDENCE CardanoSignTransactionRequest_Certificate_VoteDelegation_CardanoDRepType = 3 +) + +// Enum value maps for CardanoSignTransactionRequest_Certificate_VoteDelegation_CardanoDRepType. +var ( + CardanoSignTransactionRequest_Certificate_VoteDelegation_CardanoDRepType_name = map[int32]string{ + 0: "KEY_HASH", + 1: "SCRIPT_HASH", + 2: "ALWAYS_ABSTAIN", + 3: "ALWAYS_NO_CONFIDENCE", + } + CardanoSignTransactionRequest_Certificate_VoteDelegation_CardanoDRepType_value = map[string]int32{ + "KEY_HASH": 0, + "SCRIPT_HASH": 1, + "ALWAYS_ABSTAIN": 2, + "ALWAYS_NO_CONFIDENCE": 3, + } +) + +func (x CardanoSignTransactionRequest_Certificate_VoteDelegation_CardanoDRepType) Enum() *CardanoSignTransactionRequest_Certificate_VoteDelegation_CardanoDRepType { + p := new(CardanoSignTransactionRequest_Certificate_VoteDelegation_CardanoDRepType) + *p = x + return p +} + +func (x CardanoSignTransactionRequest_Certificate_VoteDelegation_CardanoDRepType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CardanoSignTransactionRequest_Certificate_VoteDelegation_CardanoDRepType) Descriptor() protoreflect.EnumDescriptor { + return file_cardano_proto_enumTypes[1].Descriptor() +} + +func (CardanoSignTransactionRequest_Certificate_VoteDelegation_CardanoDRepType) Type() protoreflect.EnumType { + return &file_cardano_proto_enumTypes[1] +} + +func (x CardanoSignTransactionRequest_Certificate_VoteDelegation_CardanoDRepType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CardanoSignTransactionRequest_Certificate_VoteDelegation_CardanoDRepType.Descriptor instead. +func (CardanoSignTransactionRequest_Certificate_VoteDelegation_CardanoDRepType) EnumDescriptor() ([]byte, []int) { + return file_cardano_proto_rawDescGZIP(), []int{4, 3, 1, 0} +} + type CardanoXpubsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -329,6 +381,9 @@ type CardanoSignTransactionRequest struct { Withdrawals []*CardanoSignTransactionRequest_Withdrawal `protobuf:"bytes,7,rep,name=withdrawals,proto3" json:"withdrawals,omitempty"` ValidityIntervalStart uint64 `protobuf:"varint,8,opt,name=validity_interval_start,json=validityIntervalStart,proto3" json:"validity_interval_start,omitempty"` AllowZeroTtl bool `protobuf:"varint,9,opt,name=allow_zero_ttl,json=allowZeroTtl,proto3" json:"allow_zero_ttl,omitempty"` // include ttl even if it is zero + // Tag arrays in the transaction serialization with the 258 tag. + // See https://github.com/IntersectMBO/cardano-ledger/blob/6e2d37cc0f47bd02e89b4ce9f78b59c35c958e96/eras/conway/impl/cddl-files/extra.cddl#L5 + TagCborSets bool `protobuf:"varint,10,opt,name=tag_cbor_sets,json=tagCborSets,proto3" json:"tag_cbor_sets,omitempty"` } func (x *CardanoSignTransactionRequest) Reset() { @@ -426,6 +481,13 @@ func (x *CardanoSignTransactionRequest) GetAllowZeroTtl() bool { return false } +func (x *CardanoSignTransactionRequest) GetTagCborSets() bool { + if x != nil { + return x.TagCborSets + } + return false +} + type CardanoSignTransactionResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -909,7 +971,7 @@ func (x *CardanoSignTransactionRequest_Output) GetAssetGroups() []*CardanoSignTr return nil } -// See https://github.com/input-output-hk/cardano-ledger-specs/blob/d0aa86ded0b973b09b629e5aa62aa1e71364d088/eras/alonzo/test-suite/cddl-files/alonzo.cddl#L150 +// See https://github.com/IntersectMBO/cardano-ledger/blob/cardano-ledger-conway-1.12.0.0/eras/conway/impl/cddl-files/conway.cddl#L273 type CardanoSignTransactionRequest_Certificate struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -920,6 +982,7 @@ type CardanoSignTransactionRequest_Certificate struct { // *CardanoSignTransactionRequest_Certificate_StakeRegistration // *CardanoSignTransactionRequest_Certificate_StakeDeregistration // *CardanoSignTransactionRequest_Certificate_StakeDelegation_ + // *CardanoSignTransactionRequest_Certificate_VoteDelegation_ Cert isCardanoSignTransactionRequest_Certificate_Cert `protobuf_oneof:"cert"` } @@ -983,6 +1046,13 @@ func (x *CardanoSignTransactionRequest_Certificate) GetStakeDelegation() *Cardan return nil } +func (x *CardanoSignTransactionRequest_Certificate) GetVoteDelegation() *CardanoSignTransactionRequest_Certificate_VoteDelegation { + if x, ok := x.GetCert().(*CardanoSignTransactionRequest_Certificate_VoteDelegation_); ok { + return x.VoteDelegation + } + return nil +} + type isCardanoSignTransactionRequest_Certificate_Cert interface { isCardanoSignTransactionRequest_Certificate_Cert() } @@ -999,6 +1069,10 @@ type CardanoSignTransactionRequest_Certificate_StakeDelegation_ struct { StakeDelegation *CardanoSignTransactionRequest_Certificate_StakeDelegation `protobuf:"bytes,3,opt,name=stake_delegation,json=stakeDelegation,proto3,oneof"` } +type CardanoSignTransactionRequest_Certificate_VoteDelegation_ struct { + VoteDelegation *CardanoSignTransactionRequest_Certificate_VoteDelegation `protobuf:"bytes,10,opt,name=vote_delegation,json=voteDelegation,proto3,oneof"` +} + func (*CardanoSignTransactionRequest_Certificate_StakeRegistration) isCardanoSignTransactionRequest_Certificate_Cert() { } @@ -1008,6 +1082,9 @@ func (*CardanoSignTransactionRequest_Certificate_StakeDeregistration) isCardanoS func (*CardanoSignTransactionRequest_Certificate_StakeDelegation_) isCardanoSignTransactionRequest_Certificate_Cert() { } +func (*CardanoSignTransactionRequest_Certificate_VoteDelegation_) isCardanoSignTransactionRequest_Certificate_Cert() { +} + type CardanoSignTransactionRequest_Withdrawal struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1174,6 +1251,70 @@ func (x *CardanoSignTransactionRequest_Certificate_StakeDelegation) GetPoolKeyha return nil } +type CardanoSignTransactionRequest_Certificate_VoteDelegation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // keypath in this instance refers to stake credential + Keypath []uint32 `protobuf:"varint,1,rep,packed,name=keypath,proto3" json:"keypath,omitempty"` + Type CardanoSignTransactionRequest_Certificate_VoteDelegation_CardanoDRepType `protobuf:"varint,2,opt,name=type,proto3,enum=shiftcrypto.bitbox02.CardanoSignTransactionRequest_Certificate_VoteDelegation_CardanoDRepType" json:"type,omitempty"` + DrepCredhash []byte `protobuf:"bytes,3,opt,name=drep_credhash,json=drepCredhash,proto3,oneof" json:"drep_credhash,omitempty"` +} + +func (x *CardanoSignTransactionRequest_Certificate_VoteDelegation) Reset() { + *x = CardanoSignTransactionRequest_Certificate_VoteDelegation{} + if protoimpl.UnsafeEnabled { + mi := &file_cardano_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CardanoSignTransactionRequest_Certificate_VoteDelegation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CardanoSignTransactionRequest_Certificate_VoteDelegation) ProtoMessage() {} + +func (x *CardanoSignTransactionRequest_Certificate_VoteDelegation) ProtoReflect() protoreflect.Message { + mi := &file_cardano_proto_msgTypes[16] + 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 CardanoSignTransactionRequest_Certificate_VoteDelegation.ProtoReflect.Descriptor instead. +func (*CardanoSignTransactionRequest_Certificate_VoteDelegation) Descriptor() ([]byte, []int) { + return file_cardano_proto_rawDescGZIP(), []int{4, 3, 1} +} + +func (x *CardanoSignTransactionRequest_Certificate_VoteDelegation) GetKeypath() []uint32 { + if x != nil { + return x.Keypath + } + return nil +} + +func (x *CardanoSignTransactionRequest_Certificate_VoteDelegation) GetType() CardanoSignTransactionRequest_Certificate_VoteDelegation_CardanoDRepType { + if x != nil { + return x.Type + } + return CardanoSignTransactionRequest_Certificate_VoteDelegation_KEY_HASH +} + +func (x *CardanoSignTransactionRequest_Certificate_VoteDelegation) GetDrepCredhash() []byte { + if x != nil { + return x.DrepCredhash + } + return nil +} + type CardanoSignTransactionResponse_ShelleyWitness struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1186,7 +1327,7 @@ type CardanoSignTransactionResponse_ShelleyWitness struct { func (x *CardanoSignTransactionResponse_ShelleyWitness) Reset() { *x = CardanoSignTransactionResponse_ShelleyWitness{} if protoimpl.UnsafeEnabled { - mi := &file_cardano_proto_msgTypes[16] + mi := &file_cardano_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1199,7 +1340,7 @@ func (x *CardanoSignTransactionResponse_ShelleyWitness) String() string { func (*CardanoSignTransactionResponse_ShelleyWitness) ProtoMessage() {} func (x *CardanoSignTransactionResponse_ShelleyWitness) ProtoReflect() protoreflect.Message { - mi := &file_cardano_proto_msgTypes[16] + mi := &file_cardano_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1267,8 +1408,8 @@ var file_cardano_proto_rawDesc = []byte{ 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x43, 0x61, 0x72, 0x64, 0x61, 0x6e, 0x6f, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x52, 0x0c, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xcb, - 0x0c, 0x0a, 0x1d, 0x43, 0x61, 0x72, 0x64, 0x61, 0x6e, 0x6f, 0x53, 0x69, 0x67, 0x6e, 0x54, 0x72, + 0x52, 0x0c, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xa7, + 0x10, 0x0a, 0x1d, 0x43, 0x61, 0x72, 0x64, 0x61, 0x6e, 0x6f, 0x53, 0x69, 0x67, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, @@ -1305,121 +1446,151 @@ var file_cardano_proto_rawDesc = []byte{ 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x24, 0x0a, 0x0e, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x7a, 0x65, 0x72, 0x6f, 0x5f, 0x74, 0x74, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5a, 0x65, 0x72, 0x6f, 0x54, - 0x74, 0x6c, 0x1a, 0x6b, 0x0a, 0x05, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6b, - 0x65, 0x79, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x07, 0x6b, 0x65, - 0x79, 0x70, 0x61, 0x74, 0x68, 0x12, 0x22, 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x76, 0x5f, 0x6f, 0x75, - 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x70, 0x72, - 0x65, 0x76, 0x4f, 0x75, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x24, 0x0a, 0x0e, 0x70, 0x72, 0x65, - 0x76, 0x5f, 0x6f, 0x75, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x76, 0x4f, 0x75, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x1a, - 0xc5, 0x01, 0x0a, 0x0a, 0x41, 0x73, 0x73, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1b, - 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, 0x5c, 0x0a, 0x06, 0x74, - 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x73, 0x68, + 0x74, 0x6c, 0x12, 0x22, 0x0a, 0x0d, 0x74, 0x61, 0x67, 0x5f, 0x63, 0x62, 0x6f, 0x72, 0x5f, 0x73, + 0x65, 0x74, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x74, 0x61, 0x67, 0x43, 0x62, + 0x6f, 0x72, 0x53, 0x65, 0x74, 0x73, 0x1a, 0x6b, 0x0a, 0x05, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, + 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0d, + 0x52, 0x07, 0x6b, 0x65, 0x79, 0x70, 0x61, 0x74, 0x68, 0x12, 0x22, 0x0a, 0x0d, 0x70, 0x72, 0x65, + 0x76, 0x5f, 0x6f, 0x75, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x0b, 0x70, 0x72, 0x65, 0x76, 0x4f, 0x75, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x24, 0x0a, + 0x0e, 0x70, 0x72, 0x65, 0x76, 0x5f, 0x6f, 0x75, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x76, 0x4f, 0x75, 0x74, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x1a, 0xc5, 0x01, 0x0a, 0x0a, 0x41, 0x73, 0x73, 0x65, 0x74, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, + 0x5c, 0x0a, 0x06, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x44, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, + 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x43, 0x61, 0x72, 0x64, 0x61, 0x6e, 0x6f, 0x53, 0x69, + 0x67, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x2e, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x06, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x1a, 0x3c, 0x0a, + 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x61, 0x73, 0x73, 0x65, + 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0xfa, 0x01, 0x0a, 0x06, + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, + 0x64, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0e, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x4e, 0x0a, 0x0d, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x73, + 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, + 0x78, 0x30, 0x32, 0x2e, 0x43, 0x61, 0x72, 0x64, 0x61, 0x6e, 0x6f, 0x53, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x61, 0x0a, 0x0c, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x43, 0x61, 0x72, 0x64, 0x61, 0x6e, 0x6f, 0x53, 0x69, 0x67, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x52, 0x06, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x1a, 0x3c, 0x0a, 0x05, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x61, 0x73, 0x73, 0x65, 0x74, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0xfa, 0x01, 0x0a, 0x06, 0x4f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x65, 0x6e, 0x63, - 0x6f, 0x64, 0x65, 0x64, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x4e, 0x0a, 0x0d, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, - 0x43, 0x61, 0x72, 0x64, 0x61, 0x6e, 0x6f, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x52, 0x0c, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x61, 0x0a, 0x0c, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, - 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x43, - 0x61, 0x72, 0x64, 0x61, 0x6e, 0x6f, 0x53, 0x69, 0x67, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x41, 0x73, 0x73, - 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x0b, 0x61, 0x73, 0x73, 0x65, 0x74, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x73, 0x1a, 0x87, 0x03, 0x0a, 0x0b, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x12, 0x4e, 0x0a, 0x12, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x72, 0x65, - 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1d, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, - 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x4b, 0x65, 0x79, 0x70, 0x61, 0x74, 0x68, 0x48, - 0x00, 0x52, 0x11, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x52, 0x0a, 0x14, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x64, 0x65, - 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, - 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x4b, 0x65, 0x79, 0x70, 0x61, 0x74, - 0x68, 0x48, 0x00, 0x52, 0x13, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x44, 0x65, 0x72, 0x65, 0x67, 0x69, - 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x7c, 0x0a, 0x10, 0x73, 0x74, 0x61, 0x6b, - 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x4f, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, - 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x43, 0x61, 0x72, 0x64, 0x61, 0x6e, - 0x6f, 0x53, 0x69, 0x67, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x44, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x4e, 0x0a, 0x0f, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x44, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, - 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x70, - 0x61, 0x74, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x6b, 0x65, 0x79, 0x68, - 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x70, 0x6f, 0x6f, 0x6c, 0x4b, - 0x65, 0x79, 0x68, 0x61, 0x73, 0x68, 0x42, 0x06, 0x0a, 0x04, 0x63, 0x65, 0x72, 0x74, 0x1a, 0x3c, - 0x0a, 0x0a, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x12, 0x18, 0x0a, 0x07, - 0x6b, 0x65, 0x79, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x07, 0x6b, - 0x65, 0x79, 0x70, 0x61, 0x74, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xe1, 0x01, 0x0a, - 0x1e, 0x43, 0x61, 0x72, 0x64, 0x61, 0x6e, 0x6f, 0x53, 0x69, 0x67, 0x6e, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x70, 0x0a, 0x11, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x65, 0x79, 0x5f, 0x77, 0x69, 0x74, 0x6e, 0x65, - 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x73, 0x68, 0x69, - 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, - 0x32, 0x2e, 0x43, 0x61, 0x72, 0x64, 0x61, 0x6e, 0x6f, 0x53, 0x69, 0x67, 0x6e, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2e, 0x53, 0x68, 0x65, 0x6c, 0x6c, 0x65, 0x79, 0x57, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x52, - 0x10, 0x73, 0x68, 0x65, 0x6c, 0x6c, 0x65, 0x79, 0x57, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x65, - 0x73, 0x1a, 0x4d, 0x0a, 0x0e, 0x53, 0x68, 0x65, 0x6c, 0x6c, 0x65, 0x79, 0x57, 0x69, 0x74, 0x6e, - 0x65, 0x73, 0x73, 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, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x22, 0x89, 0x02, 0x0a, 0x0e, 0x43, 0x61, 0x72, 0x64, 0x61, 0x6e, 0x6f, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x05, 0x78, 0x70, 0x75, 0x62, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, - 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x43, 0x61, 0x72, 0x64, 0x61, 0x6e, - 0x6f, 0x58, 0x70, 0x75, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, - 0x05, 0x78, 0x70, 0x75, 0x62, 0x73, 0x12, 0x47, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, - 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x43, - 0x61, 0x72, 0x64, 0x61, 0x6e, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, - 0x60, 0x0a, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x73, 0x68, 0x69, 0x66, - 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, - 0x2e, 0x43, 0x61, 0x72, 0x64, 0x61, 0x6e, 0x6f, 0x53, 0x69, 0x67, 0x6e, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, - 0x52, 0x0f, 0x73, 0x69, 0x67, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x42, 0x09, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xfb, 0x01, 0x0a, - 0x0f, 0x43, 0x61, 0x72, 0x64, 0x61, 0x6e, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x42, 0x0a, 0x05, 0x78, 0x70, 0x75, 0x62, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2a, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, - 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x43, 0x61, 0x72, 0x64, 0x61, 0x6e, 0x6f, 0x58, 0x70, - 0x75, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x05, 0x78, - 0x70, 0x75, 0x62, 0x73, 0x12, 0x35, 0x0a, 0x03, 0x70, 0x75, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, - 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x50, 0x75, 0x62, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x03, 0x70, 0x75, 0x62, 0x12, 0x61, 0x0a, 0x10, 0x73, + 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x0b, 0x61, 0x73, 0x73, + 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x1a, 0xbf, 0x06, 0x0a, 0x0b, 0x43, 0x65, 0x72, + 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x4e, 0x0a, 0x12, 0x73, 0x74, 0x61, 0x6b, + 0x65, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, + 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x4b, 0x65, 0x79, 0x70, + 0x61, 0x74, 0x68, 0x48, 0x00, 0x52, 0x11, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x52, 0x0a, 0x14, 0x73, 0x74, 0x61, 0x6b, + 0x65, 0x5f, 0x64, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x4b, 0x65, + 0x79, 0x70, 0x61, 0x74, 0x68, 0x48, 0x00, 0x52, 0x13, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x44, 0x65, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x7c, 0x0a, 0x10, + 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4f, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x43, 0x61, + 0x72, 0x64, 0x61, 0x6e, 0x6f, 0x53, 0x69, 0x67, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x65, 0x72, 0x74, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x44, 0x65, 0x6c, + 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x74, 0x61, 0x6b, 0x65, + 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x79, 0x0a, 0x0f, 0x76, 0x6f, + 0x74, 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x4e, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x43, 0x61, 0x72, 0x64, 0x61, + 0x6e, 0x6f, 0x53, 0x69, 0x67, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0e, 0x76, 0x6f, 0x74, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x4e, 0x0a, 0x0f, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x44, 0x65, + 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x70, + 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x70, 0x61, + 0x74, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x6b, 0x65, 0x79, 0x68, 0x61, + 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x70, 0x6f, 0x6f, 0x6c, 0x4b, 0x65, + 0x79, 0x68, 0x61, 0x73, 0x68, 0x1a, 0xba, 0x02, 0x0a, 0x0e, 0x56, 0x6f, 0x74, 0x65, 0x44, 0x65, + 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x70, + 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x70, 0x61, + 0x74, 0x68, 0x12, 0x72, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x5e, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, + 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x43, 0x61, 0x72, 0x64, 0x61, 0x6e, 0x6f, 0x53, + 0x69, 0x67, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x43, 0x61, 0x72, 0x64, 0x61, 0x6e, 0x6f, 0x44, 0x52, 0x65, 0x70, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x0d, 0x64, 0x72, 0x65, 0x70, 0x5f, 0x63, + 0x72, 0x65, 0x64, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, + 0x0c, 0x64, 0x72, 0x65, 0x70, 0x43, 0x72, 0x65, 0x64, 0x68, 0x61, 0x73, 0x68, 0x88, 0x01, 0x01, + 0x22, 0x5e, 0x0a, 0x0f, 0x43, 0x61, 0x72, 0x64, 0x61, 0x6e, 0x6f, 0x44, 0x52, 0x65, 0x70, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x4b, 0x45, 0x59, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x10, + 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x43, 0x52, 0x49, 0x50, 0x54, 0x5f, 0x48, 0x41, 0x53, 0x48, + 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x4c, 0x57, 0x41, 0x59, 0x53, 0x5f, 0x41, 0x42, 0x53, + 0x54, 0x41, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x4c, 0x57, 0x41, 0x59, 0x53, + 0x5f, 0x4e, 0x4f, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x44, 0x45, 0x4e, 0x43, 0x45, 0x10, 0x03, + 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x64, 0x72, 0x65, 0x70, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x68, 0x61, + 0x73, 0x68, 0x42, 0x06, 0x0a, 0x04, 0x63, 0x65, 0x72, 0x74, 0x1a, 0x3c, 0x0a, 0x0a, 0x57, 0x69, + 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x70, + 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x70, 0x61, + 0x74, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xe1, 0x01, 0x0a, 0x1e, 0x43, 0x61, 0x72, + 0x64, 0x61, 0x6e, 0x6f, 0x53, 0x69, 0x67, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x70, 0x0a, 0x11, 0x73, + 0x68, 0x65, 0x6c, 0x6c, 0x65, 0x79, 0x5f, 0x77, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x43, 0x61, + 0x72, 0x64, 0x61, 0x6e, 0x6f, 0x53, 0x69, 0x67, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x68, 0x65, + 0x6c, 0x6c, 0x65, 0x79, 0x57, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x52, 0x10, 0x73, 0x68, 0x65, + 0x6c, 0x6c, 0x65, 0x79, 0x57, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x65, 0x73, 0x1a, 0x4d, 0x0a, + 0x0e, 0x53, 0x68, 0x65, 0x6c, 0x6c, 0x65, 0x79, 0x57, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 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, 0x1c, + 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x89, 0x02, 0x0a, + 0x0e, 0x43, 0x61, 0x72, 0x64, 0x61, 0x6e, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x41, 0x0a, 0x05, 0x78, 0x70, 0x75, 0x62, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, + 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, + 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x43, 0x61, 0x72, 0x64, 0x61, 0x6e, 0x6f, 0x58, 0x70, 0x75, + 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x05, 0x78, 0x70, 0x75, + 0x62, 0x73, 0x12, 0x47, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x43, 0x61, 0x72, 0x64, 0x61, + 0x6e, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x48, 0x00, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x60, 0x0a, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x43, 0x61, 0x72, 0x64, 0x61, 0x6e, 0x6f, 0x53, 0x69, 0x67, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x73, - 0x69, 0x67, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, - 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x38, 0x0a, 0x0e, 0x43, 0x61, - 0x72, 0x64, 0x61, 0x6e, 0x6f, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x12, 0x0a, 0x0e, - 0x43, 0x61, 0x72, 0x64, 0x61, 0x6e, 0x6f, 0x4d, 0x61, 0x69, 0x6e, 0x6e, 0x65, 0x74, 0x10, 0x00, - 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x61, 0x72, 0x64, 0x61, 0x6e, 0x6f, 0x54, 0x65, 0x73, 0x74, 0x6e, - 0x65, 0x74, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x69, + 0x67, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0x0a, + 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xfb, 0x01, 0x0a, 0x0f, 0x43, 0x61, 0x72, + 0x64, 0x61, 0x6e, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x05, + 0x78, 0x70, 0x75, 0x62, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x73, 0x68, + 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, + 0x30, 0x32, 0x2e, 0x43, 0x61, 0x72, 0x64, 0x61, 0x6e, 0x6f, 0x58, 0x70, 0x75, 0x62, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x05, 0x78, 0x70, 0x75, 0x62, 0x73, + 0x12, 0x35, 0x0a, 0x03, 0x70, 0x75, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, + 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x62, 0x69, 0x74, 0x62, + 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x50, 0x75, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x48, 0x00, 0x52, 0x03, 0x70, 0x75, 0x62, 0x12, 0x61, 0x0a, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x5f, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x34, 0x2e, 0x73, 0x68, 0x69, 0x66, 0x74, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, + 0x62, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x30, 0x32, 0x2e, 0x43, 0x61, 0x72, 0x64, 0x61, 0x6e, 0x6f, + 0x53, 0x69, 0x67, 0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x69, 0x67, 0x6e, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x38, 0x0a, 0x0e, 0x43, 0x61, 0x72, 0x64, 0x61, 0x6e, + 0x6f, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x61, 0x72, 0x64, + 0x61, 0x6e, 0x6f, 0x4d, 0x61, 0x69, 0x6e, 0x6e, 0x65, 0x74, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, + 0x43, 0x61, 0x72, 0x64, 0x61, 0x6e, 0x6f, 0x54, 0x65, 0x73, 0x74, 0x6e, 0x65, 0x74, 0x10, 0x01, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1434,58 +1605,62 @@ func file_cardano_proto_rawDescGZIP() []byte { return file_cardano_proto_rawDescData } -var file_cardano_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_cardano_proto_msgTypes = make([]protoimpl.MessageInfo, 17) +var file_cardano_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_cardano_proto_msgTypes = make([]protoimpl.MessageInfo, 18) var file_cardano_proto_goTypes = []any{ - (CardanoNetwork)(0), // 0: shiftcrypto.bitbox02.CardanoNetwork - (*CardanoXpubsRequest)(nil), // 1: shiftcrypto.bitbox02.CardanoXpubsRequest - (*CardanoXpubsResponse)(nil), // 2: shiftcrypto.bitbox02.CardanoXpubsResponse - (*CardanoScriptConfig)(nil), // 3: shiftcrypto.bitbox02.CardanoScriptConfig - (*CardanoAddressRequest)(nil), // 4: shiftcrypto.bitbox02.CardanoAddressRequest - (*CardanoSignTransactionRequest)(nil), // 5: shiftcrypto.bitbox02.CardanoSignTransactionRequest - (*CardanoSignTransactionResponse)(nil), // 6: shiftcrypto.bitbox02.CardanoSignTransactionResponse - (*CardanoRequest)(nil), // 7: shiftcrypto.bitbox02.CardanoRequest - (*CardanoResponse)(nil), // 8: shiftcrypto.bitbox02.CardanoResponse - (*CardanoScriptConfig_PkhSkh)(nil), // 9: shiftcrypto.bitbox02.CardanoScriptConfig.PkhSkh - (*CardanoSignTransactionRequest_Input)(nil), // 10: shiftcrypto.bitbox02.CardanoSignTransactionRequest.Input - (*CardanoSignTransactionRequest_AssetGroup)(nil), // 11: shiftcrypto.bitbox02.CardanoSignTransactionRequest.AssetGroup - (*CardanoSignTransactionRequest_Output)(nil), // 12: shiftcrypto.bitbox02.CardanoSignTransactionRequest.Output - (*CardanoSignTransactionRequest_Certificate)(nil), // 13: shiftcrypto.bitbox02.CardanoSignTransactionRequest.Certificate - (*CardanoSignTransactionRequest_Withdrawal)(nil), // 14: shiftcrypto.bitbox02.CardanoSignTransactionRequest.Withdrawal - (*CardanoSignTransactionRequest_AssetGroup_Token)(nil), // 15: shiftcrypto.bitbox02.CardanoSignTransactionRequest.AssetGroup.Token - (*CardanoSignTransactionRequest_Certificate_StakeDelegation)(nil), // 16: shiftcrypto.bitbox02.CardanoSignTransactionRequest.Certificate.StakeDelegation - (*CardanoSignTransactionResponse_ShelleyWitness)(nil), // 17: shiftcrypto.bitbox02.CardanoSignTransactionResponse.ShelleyWitness - (*Keypath)(nil), // 18: shiftcrypto.bitbox02.Keypath - (*PubResponse)(nil), // 19: shiftcrypto.bitbox02.PubResponse + (CardanoNetwork)(0), // 0: shiftcrypto.bitbox02.CardanoNetwork + (CardanoSignTransactionRequest_Certificate_VoteDelegation_CardanoDRepType)(0), // 1: shiftcrypto.bitbox02.CardanoSignTransactionRequest.Certificate.VoteDelegation.CardanoDRepType + (*CardanoXpubsRequest)(nil), // 2: shiftcrypto.bitbox02.CardanoXpubsRequest + (*CardanoXpubsResponse)(nil), // 3: shiftcrypto.bitbox02.CardanoXpubsResponse + (*CardanoScriptConfig)(nil), // 4: shiftcrypto.bitbox02.CardanoScriptConfig + (*CardanoAddressRequest)(nil), // 5: shiftcrypto.bitbox02.CardanoAddressRequest + (*CardanoSignTransactionRequest)(nil), // 6: shiftcrypto.bitbox02.CardanoSignTransactionRequest + (*CardanoSignTransactionResponse)(nil), // 7: shiftcrypto.bitbox02.CardanoSignTransactionResponse + (*CardanoRequest)(nil), // 8: shiftcrypto.bitbox02.CardanoRequest + (*CardanoResponse)(nil), // 9: shiftcrypto.bitbox02.CardanoResponse + (*CardanoScriptConfig_PkhSkh)(nil), // 10: shiftcrypto.bitbox02.CardanoScriptConfig.PkhSkh + (*CardanoSignTransactionRequest_Input)(nil), // 11: shiftcrypto.bitbox02.CardanoSignTransactionRequest.Input + (*CardanoSignTransactionRequest_AssetGroup)(nil), // 12: shiftcrypto.bitbox02.CardanoSignTransactionRequest.AssetGroup + (*CardanoSignTransactionRequest_Output)(nil), // 13: shiftcrypto.bitbox02.CardanoSignTransactionRequest.Output + (*CardanoSignTransactionRequest_Certificate)(nil), // 14: shiftcrypto.bitbox02.CardanoSignTransactionRequest.Certificate + (*CardanoSignTransactionRequest_Withdrawal)(nil), // 15: shiftcrypto.bitbox02.CardanoSignTransactionRequest.Withdrawal + (*CardanoSignTransactionRequest_AssetGroup_Token)(nil), // 16: shiftcrypto.bitbox02.CardanoSignTransactionRequest.AssetGroup.Token + (*CardanoSignTransactionRequest_Certificate_StakeDelegation)(nil), // 17: shiftcrypto.bitbox02.CardanoSignTransactionRequest.Certificate.StakeDelegation + (*CardanoSignTransactionRequest_Certificate_VoteDelegation)(nil), // 18: shiftcrypto.bitbox02.CardanoSignTransactionRequest.Certificate.VoteDelegation + (*CardanoSignTransactionResponse_ShelleyWitness)(nil), // 19: shiftcrypto.bitbox02.CardanoSignTransactionResponse.ShelleyWitness + (*Keypath)(nil), // 20: shiftcrypto.bitbox02.Keypath + (*PubResponse)(nil), // 21: shiftcrypto.bitbox02.PubResponse } var file_cardano_proto_depIdxs = []int32{ - 18, // 0: shiftcrypto.bitbox02.CardanoXpubsRequest.keypaths:type_name -> shiftcrypto.bitbox02.Keypath - 9, // 1: shiftcrypto.bitbox02.CardanoScriptConfig.pkh_skh:type_name -> shiftcrypto.bitbox02.CardanoScriptConfig.PkhSkh + 20, // 0: shiftcrypto.bitbox02.CardanoXpubsRequest.keypaths:type_name -> shiftcrypto.bitbox02.Keypath + 10, // 1: shiftcrypto.bitbox02.CardanoScriptConfig.pkh_skh:type_name -> shiftcrypto.bitbox02.CardanoScriptConfig.PkhSkh 0, // 2: shiftcrypto.bitbox02.CardanoAddressRequest.network:type_name -> shiftcrypto.bitbox02.CardanoNetwork - 3, // 3: shiftcrypto.bitbox02.CardanoAddressRequest.script_config:type_name -> shiftcrypto.bitbox02.CardanoScriptConfig + 4, // 3: shiftcrypto.bitbox02.CardanoAddressRequest.script_config:type_name -> shiftcrypto.bitbox02.CardanoScriptConfig 0, // 4: shiftcrypto.bitbox02.CardanoSignTransactionRequest.network:type_name -> shiftcrypto.bitbox02.CardanoNetwork - 10, // 5: shiftcrypto.bitbox02.CardanoSignTransactionRequest.inputs:type_name -> shiftcrypto.bitbox02.CardanoSignTransactionRequest.Input - 12, // 6: shiftcrypto.bitbox02.CardanoSignTransactionRequest.outputs:type_name -> shiftcrypto.bitbox02.CardanoSignTransactionRequest.Output - 13, // 7: shiftcrypto.bitbox02.CardanoSignTransactionRequest.certificates:type_name -> shiftcrypto.bitbox02.CardanoSignTransactionRequest.Certificate - 14, // 8: shiftcrypto.bitbox02.CardanoSignTransactionRequest.withdrawals:type_name -> shiftcrypto.bitbox02.CardanoSignTransactionRequest.Withdrawal - 17, // 9: shiftcrypto.bitbox02.CardanoSignTransactionResponse.shelley_witnesses:type_name -> shiftcrypto.bitbox02.CardanoSignTransactionResponse.ShelleyWitness - 1, // 10: shiftcrypto.bitbox02.CardanoRequest.xpubs:type_name -> shiftcrypto.bitbox02.CardanoXpubsRequest - 4, // 11: shiftcrypto.bitbox02.CardanoRequest.address:type_name -> shiftcrypto.bitbox02.CardanoAddressRequest - 5, // 12: shiftcrypto.bitbox02.CardanoRequest.sign_transaction:type_name -> shiftcrypto.bitbox02.CardanoSignTransactionRequest - 2, // 13: shiftcrypto.bitbox02.CardanoResponse.xpubs:type_name -> shiftcrypto.bitbox02.CardanoXpubsResponse - 19, // 14: shiftcrypto.bitbox02.CardanoResponse.pub:type_name -> shiftcrypto.bitbox02.PubResponse - 6, // 15: shiftcrypto.bitbox02.CardanoResponse.sign_transaction:type_name -> shiftcrypto.bitbox02.CardanoSignTransactionResponse - 15, // 16: shiftcrypto.bitbox02.CardanoSignTransactionRequest.AssetGroup.tokens:type_name -> shiftcrypto.bitbox02.CardanoSignTransactionRequest.AssetGroup.Token - 3, // 17: shiftcrypto.bitbox02.CardanoSignTransactionRequest.Output.script_config:type_name -> shiftcrypto.bitbox02.CardanoScriptConfig - 11, // 18: shiftcrypto.bitbox02.CardanoSignTransactionRequest.Output.asset_groups:type_name -> shiftcrypto.bitbox02.CardanoSignTransactionRequest.AssetGroup - 18, // 19: shiftcrypto.bitbox02.CardanoSignTransactionRequest.Certificate.stake_registration:type_name -> shiftcrypto.bitbox02.Keypath - 18, // 20: shiftcrypto.bitbox02.CardanoSignTransactionRequest.Certificate.stake_deregistration:type_name -> shiftcrypto.bitbox02.Keypath - 16, // 21: shiftcrypto.bitbox02.CardanoSignTransactionRequest.Certificate.stake_delegation:type_name -> shiftcrypto.bitbox02.CardanoSignTransactionRequest.Certificate.StakeDelegation - 22, // [22:22] is the sub-list for method output_type - 22, // [22:22] is the sub-list for method input_type - 22, // [22:22] is the sub-list for extension type_name - 22, // [22:22] is the sub-list for extension extendee - 0, // [0:22] is the sub-list for field type_name + 11, // 5: shiftcrypto.bitbox02.CardanoSignTransactionRequest.inputs:type_name -> shiftcrypto.bitbox02.CardanoSignTransactionRequest.Input + 13, // 6: shiftcrypto.bitbox02.CardanoSignTransactionRequest.outputs:type_name -> shiftcrypto.bitbox02.CardanoSignTransactionRequest.Output + 14, // 7: shiftcrypto.bitbox02.CardanoSignTransactionRequest.certificates:type_name -> shiftcrypto.bitbox02.CardanoSignTransactionRequest.Certificate + 15, // 8: shiftcrypto.bitbox02.CardanoSignTransactionRequest.withdrawals:type_name -> shiftcrypto.bitbox02.CardanoSignTransactionRequest.Withdrawal + 19, // 9: shiftcrypto.bitbox02.CardanoSignTransactionResponse.shelley_witnesses:type_name -> shiftcrypto.bitbox02.CardanoSignTransactionResponse.ShelleyWitness + 2, // 10: shiftcrypto.bitbox02.CardanoRequest.xpubs:type_name -> shiftcrypto.bitbox02.CardanoXpubsRequest + 5, // 11: shiftcrypto.bitbox02.CardanoRequest.address:type_name -> shiftcrypto.bitbox02.CardanoAddressRequest + 6, // 12: shiftcrypto.bitbox02.CardanoRequest.sign_transaction:type_name -> shiftcrypto.bitbox02.CardanoSignTransactionRequest + 3, // 13: shiftcrypto.bitbox02.CardanoResponse.xpubs:type_name -> shiftcrypto.bitbox02.CardanoXpubsResponse + 21, // 14: shiftcrypto.bitbox02.CardanoResponse.pub:type_name -> shiftcrypto.bitbox02.PubResponse + 7, // 15: shiftcrypto.bitbox02.CardanoResponse.sign_transaction:type_name -> shiftcrypto.bitbox02.CardanoSignTransactionResponse + 16, // 16: shiftcrypto.bitbox02.CardanoSignTransactionRequest.AssetGroup.tokens:type_name -> shiftcrypto.bitbox02.CardanoSignTransactionRequest.AssetGroup.Token + 4, // 17: shiftcrypto.bitbox02.CardanoSignTransactionRequest.Output.script_config:type_name -> shiftcrypto.bitbox02.CardanoScriptConfig + 12, // 18: shiftcrypto.bitbox02.CardanoSignTransactionRequest.Output.asset_groups:type_name -> shiftcrypto.bitbox02.CardanoSignTransactionRequest.AssetGroup + 20, // 19: shiftcrypto.bitbox02.CardanoSignTransactionRequest.Certificate.stake_registration:type_name -> shiftcrypto.bitbox02.Keypath + 20, // 20: shiftcrypto.bitbox02.CardanoSignTransactionRequest.Certificate.stake_deregistration:type_name -> shiftcrypto.bitbox02.Keypath + 17, // 21: shiftcrypto.bitbox02.CardanoSignTransactionRequest.Certificate.stake_delegation:type_name -> shiftcrypto.bitbox02.CardanoSignTransactionRequest.Certificate.StakeDelegation + 18, // 22: shiftcrypto.bitbox02.CardanoSignTransactionRequest.Certificate.vote_delegation:type_name -> shiftcrypto.bitbox02.CardanoSignTransactionRequest.Certificate.VoteDelegation + 1, // 23: shiftcrypto.bitbox02.CardanoSignTransactionRequest.Certificate.VoteDelegation.type:type_name -> shiftcrypto.bitbox02.CardanoSignTransactionRequest.Certificate.VoteDelegation.CardanoDRepType + 24, // [24:24] is the sub-list for method output_type + 24, // [24:24] is the sub-list for method input_type + 24, // [24:24] is the sub-list for extension type_name + 24, // [24:24] is the sub-list for extension extendee + 0, // [0:24] is the sub-list for field type_name } func init() { file_cardano_proto_init() } @@ -1688,6 +1863,18 @@ func file_cardano_proto_init() { } } file_cardano_proto_msgTypes[16].Exporter = func(v any, i int) any { + switch v := v.(*CardanoSignTransactionRequest_Certificate_VoteDelegation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cardano_proto_msgTypes[17].Exporter = func(v any, i int) any { switch v := v.(*CardanoSignTransactionResponse_ShelleyWitness); i { case 0: return &v.state @@ -1717,14 +1904,16 @@ func file_cardano_proto_init() { (*CardanoSignTransactionRequest_Certificate_StakeRegistration)(nil), (*CardanoSignTransactionRequest_Certificate_StakeDeregistration)(nil), (*CardanoSignTransactionRequest_Certificate_StakeDelegation_)(nil), + (*CardanoSignTransactionRequest_Certificate_VoteDelegation_)(nil), } + file_cardano_proto_msgTypes[16].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cardano_proto_rawDesc, - NumEnums: 1, - NumMessages: 17, + NumEnums: 2, + NumMessages: 18, NumExtensions: 0, NumServices: 0, }, diff --git a/api/firmware/messages/cardano.proto b/api/firmware/messages/cardano.proto index ba4bca5..54b661d 100644 --- a/api/firmware/messages/cardano.proto +++ b/api/firmware/messages/cardano.proto @@ -85,16 +85,30 @@ message CardanoSignTransactionRequest { repeated AssetGroup asset_groups = 4; } - // See https://github.com/input-output-hk/cardano-ledger-specs/blob/d0aa86ded0b973b09b629e5aa62aa1e71364d088/eras/alonzo/test-suite/cddl-files/alonzo.cddl#L150 + // See https://github.com/IntersectMBO/cardano-ledger/blob/cardano-ledger-conway-1.12.0.0/eras/conway/impl/cddl-files/conway.cddl#L273 message Certificate { message StakeDelegation { repeated uint32 keypath = 1; bytes pool_keyhash = 2; } + message VoteDelegation { + enum CardanoDRepType { + KEY_HASH = 0; + SCRIPT_HASH = 1; + ALWAYS_ABSTAIN = 2; + ALWAYS_NO_CONFIDENCE = 3; + } + + // keypath in this instance refers to stake credential + repeated uint32 keypath = 1; + CardanoDRepType type = 2; + optional bytes drep_credhash = 3; + } oneof cert { Keypath stake_registration = 1; Keypath stake_deregistration = 2; StakeDelegation stake_delegation = 3; + VoteDelegation vote_delegation = 10; } } @@ -112,6 +126,9 @@ message CardanoSignTransactionRequest { repeated Withdrawal withdrawals = 7; uint64 validity_interval_start = 8; bool allow_zero_ttl = 9; // include ttl even if it is zero + // Tag arrays in the transaction serialization with the 258 tag. + // See https://github.com/IntersectMBO/cardano-ledger/blob/6e2d37cc0f47bd02e89b4ce9f78b59c35c958e96/eras/conway/impl/cddl-files/extra.cddl#L5 + bool tag_cbor_sets = 10; } message CardanoSignTransactionResponse { diff --git a/cmd/playground/main.go b/cmd/playground/main.go index a8df56a..aae3dce 100644 --- a/cmd/playground/main.go +++ b/cmd/playground/main.go @@ -161,6 +161,7 @@ func signFromTxID(device *firmware.Device, txID string) { Keypath: []uint32{84 + HARDENED, 1 + HARDENED, 0 + HARDENED}, }, }, + nil, &firmware.BTCTx{ Version: tx.Transaction.Version, Inputs: inputs, From 86b43d236dbee0b374f807a17ec9b5baf144bb1d Mon Sep 17 00:00:00 2001 From: Marko Bencun Date: Thu, 13 Feb 2025 12:31:49 +0100 Subject: [PATCH 3/6] firmware: rename typo in test names Marked the wrong one as the simulator test. --- api/firmware/btc_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/firmware/btc_test.go b/api/firmware/btc_test.go index 70bc8f3..c124b55 100644 --- a/api/firmware/btc_test.go +++ b/api/firmware/btc_test.go @@ -82,7 +82,7 @@ func TestBTCXpub(t *testing.T) { }) } -func TestBTCAddress(t *testing.T) { +func TestSimulatorBTCAddress(t *testing.T) { testInitializedSimulators(t, func(t *testing.T, device *Device, stdOut *bytes.Buffer) { t.Helper() address, err := device.BTCAddress( @@ -208,7 +208,7 @@ func TestSimulatorBTCXPub(t *testing.T) { }) } -func TestSimulatorBTCAddress(t *testing.T) { +func TestBTCAddress(t *testing.T) { testConfigurations(t, func(t *testing.T, env *testEnv) { t.Helper() expected := "mocked-address" From dc948bf05fd451a25eb25a628f489fa24d805cb4 Mon Sep 17 00:00:00 2001 From: Marko Bencun Date: Thu, 13 Feb 2025 12:37:15 +0100 Subject: [PATCH 4/6] api/firmware: add BTCAddress regtest simulator test Previous commit pulled in the new firmware protobuf messages, so we can add a test for it now. --- api/firmware/btc_test.go | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/api/firmware/btc_test.go b/api/firmware/btc_test.go index c124b55..54e92ce 100644 --- a/api/firmware/btc_test.go +++ b/api/firmware/btc_test.go @@ -85,6 +85,7 @@ func TestBTCXpub(t *testing.T) { func TestSimulatorBTCAddress(t *testing.T) { testInitializedSimulators(t, func(t *testing.T, device *Device, stdOut *bytes.Buffer) { t.Helper() + // TBTC, P2WPKH address, err := device.BTCAddress( messages.BTCCoin_TBTC, []uint32{ @@ -99,6 +100,43 @@ func TestSimulatorBTCAddress(t *testing.T) { ) require.NoError(t, err) require.Equal(t, "tb1qq064dxjgl9h9wzgsmzy6t6306qew42w9ka02u3", address) + + // BTC, P2WPKH + address, err = device.BTCAddress( + messages.BTCCoin_BTC, + []uint32{ + 84 + hardenedKeyStart, + 0 + hardenedKeyStart, + 0 + hardenedKeyStart, + 1, + 10, + }, + NewBTCScriptConfigSimple(messages.BTCScriptConfig_P2WPKH), + false, + ) + require.NoError(t, err) + require.Equal(t, "bc1qcq0ceq9vs24g4tnkkx3k2rry9j44r74huc3d7s", address) + + // RBTC, P2WPKH + address, err = device.BTCAddress( + messages.BTCCoin_RBTC, + []uint32{ + 84 + hardenedKeyStart, + 1 + hardenedKeyStart, + 0 + hardenedKeyStart, + 1, + 10, + }, + NewBTCScriptConfigSimple(messages.BTCScriptConfig_P2WPKH), + false, + ) + // Regtest (RBTC) support added in v9.21.0 + if device.Version().AtLeast(semver.NewSemVer(9, 21, 0)) { + require.NoError(t, err) + require.Equal(t, "bcrt1qq064dxjgl9h9wzgsmzy6t6306qew42w955k8tc", address) + } else { + require.Error(t, err) + } }) } From 5e3567cc852618a32a48fc305d4390c1595268fe Mon Sep 17 00:00:00 2001 From: Marko Bencun Date: Tue, 18 Feb 2025 11:54:09 +0100 Subject: [PATCH 5/6] tests: add v9.22.0 simulator --- api/firmware/testdata/simulators.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/firmware/testdata/simulators.json b/api/firmware/testdata/simulators.json index 8a9300d..ed22ef7 100644 --- a/api/firmware/testdata/simulators.json +++ b/api/firmware/testdata/simulators.json @@ -10,5 +10,9 @@ { "url": "https://github.com/BitBoxSwiss/bitbox02-firmware/releases/download/firmware%2Fv9.21.0/bitbox02-multi-v9.21.0-simulator1.0.0-linux-amd64", "sha256": "72031b226ea344970a6a1506893838a63b075e0bad726557ab9d941b42c534f5" + }, + { + "url": "https://github.com/BitBoxSwiss/bitbox02-firmware/releases/download/firmware%2Fv9.22.0/bitbox02-multi-v9.22.0-simulator1.0.0-linux-amd64", + "sha256": "3af12697f6fd51b155bf277ef01ef3eea5290908bff99a4aae83a95cb144ced1" } ] From 57eb1c06989f56145b0003761bc075e9baf4c7c2 Mon Sep 17 00:00:00 2001 From: Marko Bencun Date: Tue, 18 Feb 2025 11:55:06 +0100 Subject: [PATCH 6/6] cardano: add min version check --- api/firmware/cardano.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/api/firmware/cardano.go b/api/firmware/cardano.go index d8bd94f..865b742 100644 --- a/api/firmware/cardano.go +++ b/api/firmware/cardano.go @@ -17,6 +17,7 @@ package firmware import ( "github.com/BitBoxSwiss/bitbox02-api-go/api/firmware/messages" "github.com/BitBoxSwiss/bitbox02-api-go/util/errp" + "github.com/BitBoxSwiss/bitbox02-api-go/util/semver" ) // queryCardano is like query, but nested one level deeper for Cardano. @@ -92,6 +93,12 @@ func (device *Device) CardanoAddress( func (device *Device) CardanoSignTransaction( transaction *messages.CardanoSignTransactionRequest, ) (*messages.CardanoSignTransactionResponse, error) { + if transaction.TagCborSets { + if !device.version.AtLeast(semver.NewSemVer(9, 22, 0)) { + return nil, UnsupportedError("9.22.0") + } + } + request := &messages.CardanoRequest{ Request: &messages.CardanoRequest_SignTransaction{ SignTransaction: transaction,