From 6c4da0a84d69342b9902455898ab57e30666db7e Mon Sep 17 00:00:00 2001 From: Gabe Rodriguez Date: Thu, 5 Oct 2023 09:13:45 +0200 Subject: [PATCH] Rename all account_group_id instances to wallet --- crates/bin/pcli/src/command/keys.rs | 12 +- crates/bin/pcli/src/command/tx.rs | 58 ++-- crates/bin/pcli/src/command/tx/replicate.rs | 6 +- crates/bin/pcli/src/command/validator.rs | 8 +- crates/bin/pcli/src/command/view/balance.rs | 5 +- crates/bin/pcli/src/command/view/staked.rs | 4 +- crates/bin/pcli/src/main.rs | 3 +- .../bin/pclientd/tests/network_integration.rs | 8 +- crates/core/component/chain/src/lib.rs | 3 +- crates/core/keys/src/address/view.rs | 24 +- crates/core/keys/src/keys/fvk.rs | 6 +- crates/core/keys/src/keys/wallet.rs | 12 +- crates/core/keys/tests/test_wallet.rs | 5 +- crates/custody/src/request.rs | 6 +- .../src/gen/penumbra.core.keys.v1alpha1.rs | 4 +- .../gen/penumbra.core.keys.v1alpha1.serde.rs | 211 ++++++++------- .../src/gen/penumbra.custody.v1alpha1.rs | 4 +- .../gen/penumbra.custody.v1alpha1.serde.rs | 25 +- .../gen/penumbra.narsil.ledger.v1alpha1.rs | 16 +- .../penumbra.narsil.ledger.v1alpha1.serde.rs | 244 ++++++++--------- .../proto/src/gen/penumbra.view.v1alpha1.rs | 64 ++--- .../src/gen/penumbra.view.v1alpha1.serde.rs | 250 +++++++++--------- .../proto/src/gen/proto_descriptor.bin.no_lfs | Bin 325525 -> 325069 bytes crates/view/src/client.rs | 60 ++--- crates/view/src/planner.rs | 10 +- crates/view/src/service.rs | 44 ++- crates/wallet/src/build.rs | 4 +- crates/wallet/src/plan.rs | 69 ++--- crates/wasm/src/keys.rs | 2 +- crates/wasm/src/planner.rs | 4 +- crates/wasm/tests/test_keys.rs | 3 +- .../protocol/addresses_keys/viewing_keys.md | 16 +- .../penumbra/core/keys/v1alpha1/keys.pb.go | 30 +-- .../penumbra/custody/v1alpha1/custody.pb.go | 10 +- .../narsil/ledger/v1alpha1/ledger.pb.go | 48 ++-- .../go/gen/penumbra/view/v1alpha1/view.pb.go | 102 +++---- .../penumbra/core/keys/v1alpha1/keys.proto | 64 ++--- .../penumbra/custody/v1alpha1/custody.proto | 2 +- .../narsil/ledger/v1alpha1/ledger.proto | 16 +- .../penumbra/view/v1alpha1/view.proto | 108 ++++---- 40 files changed, 754 insertions(+), 816 deletions(-) diff --git a/crates/bin/pcli/src/command/keys.rs b/crates/bin/pcli/src/command/keys.rs index 738c12fa70..172071bbb4 100644 --- a/crates/bin/pcli/src/command/keys.rs +++ b/crates/bin/pcli/src/command/keys.rs @@ -42,8 +42,8 @@ pub enum ImportCmd { pub enum ExportCmd { /// Export the full viewing key for the wallet. FullViewingKey, - /// Export the account group ID. - AccountGroupId, + /// Export the wallet. + Wallet, } impl KeysCmd { @@ -122,10 +122,10 @@ impl KeysCmd { let wallet = KeyStore::load(data_dir.join(crate::CUSTODY_FILE_NAME))?; println!("{}", wallet.spend_key.full_viewing_key()); } - KeysCmd::Export(ExportCmd::AccountGroupId) => { - let wallet = KeyStore::load(data_dir.join(crate::CUSTODY_FILE_NAME))?; - let account_group_id = wallet.spend_key.full_viewing_key().account_group_id(); - println!("{}", serde_json::to_string_pretty(&account_group_id)?); + KeysCmd::Export(ExportCmd::Wallet) => { + let key_store = KeyStore::load(data_dir.join(crate::CUSTODY_FILE_NAME))?; + let wallet = key_store.spend_key.full_viewing_key().wallet(); + println!("{}", serde_json::to_string_pretty(&wallet)?); } KeysCmd::Delete => { let wallet_path = data_dir.join(crate::CUSTODY_FILE_NAME); diff --git a/crates/bin/pcli/src/command/tx.rs b/crates/bin/pcli/src/command/tx.rs index 363e2bde11..0253dda9e5 100644 --- a/crates/bin/pcli/src/command/tx.rs +++ b/crates/bin/pcli/src/command/tx.rs @@ -45,9 +45,11 @@ use regex::Regex; use crate::App; mod proposal; + use proposal::ProposalCmd; mod liquidity_position; + use liquidity_position::PositionCmd; mod replicate; @@ -203,7 +205,7 @@ pub enum TxCmd { #[clap(long, default_value = "0", display_order = 150)] timeout_timestamp: u64, - /// Only withdraw funds from the specified account group within Penumbra. + /// Only withdraw funds from the specified wallet within Penumbra. #[clap(long, default_value = "0", display_order = 200)] source: u32, }, @@ -290,7 +292,7 @@ impl TxCmd { }; let plan = plan::send( - app.fvk.account_group_id(), + app.fvk.wallet(), app.view.as_mut().context("view service initialized")?, OsRng, &values, @@ -323,7 +325,7 @@ impl TxCmd { app.view .as_mut() .context("view service must be initialized")?, - app.fvk.account_group_id(), + app.fvk.wallet(), AddressIndex::new(*source), ) .await?; @@ -331,7 +333,7 @@ impl TxCmd { } TxCmd::Sweep => loop { let plans = plan::sweep( - app.fvk.account_group_id(), + app.fvk.wallet(), app.view .as_mut() .context("view service must be initialized")?, @@ -378,9 +380,9 @@ impl TxCmd { planner.fee(swap_fee); planner.swap(input, into.id(), swap_claim_fee.clone(), claim_address)?; - let account_group_id = app.fvk.account_group_id(); + let wallet = app.fvk.wallet(); let plan = planner - .plan(app.view(), account_group_id, AddressIndex::new(*source)) + .plan(app.view(), wallet, AddressIndex::new(*source)) .await .context("can't plan swap transaction")?; @@ -399,7 +401,7 @@ impl TxCmd { // Fetch the SwapRecord with the claimable swap. let swap_record = app .view() - .swap_by_commitment(account_group_id, swap_plaintext.swap_commitment()) + .swap_by_commitment(wallet, swap_plaintext.swap_commitment()) .await?; let asset_cache = app.view().assets().await?; @@ -412,12 +414,12 @@ impl TxCmd { "You will receive outputs of {} and {}. Claiming now...", Value { amount: pro_rata_outputs.0, - asset_id: swap_record.output_data.trading_pair.asset_1() + asset_id: swap_record.output_data.trading_pair.asset_1(), } .format(&asset_cache), Value { amount: pro_rata_outputs.1, - asset_id: swap_record.output_data.trading_pair.asset_2() + asset_id: swap_record.output_data.trading_pair.asset_2(), } .format(&asset_cache), ); @@ -429,7 +431,7 @@ impl TxCmd { .app_params() .await?; - let account_group_id = app.fvk.account_group_id(); + let wallet = app.fvk.wallet(); let mut planner = Planner::new(OsRng); let plan = planner @@ -441,7 +443,7 @@ impl TxCmd { proof_blinding_r: Fq::rand(&mut OsRng), proof_blinding_s: Fq::rand(&mut OsRng), }) - .plan(app.view(), account_group_id, AddressIndex::new(*source)) + .plan(app.view(), wallet, AddressIndex::new(*source)) .await .context("can't plan swap claim")?; @@ -475,7 +477,7 @@ impl TxCmd { let fee = Fee::from_staking_token_amount((*fee).into()); let plan = plan::delegate( - app.fvk.account_group_id(), + app.fvk.wallet(), app.view .as_mut() .context("view service must be initialized")?, @@ -530,7 +532,7 @@ impl TxCmd { app.view .as_mut() .context("view service must be initialized")?, - app.fvk.account_group_id(), + app.fvk.wallet(), AddressIndex::new(*source), ) .await @@ -541,7 +543,7 @@ impl TxCmd { TxCmd::UndelegateClaim { fee } => { let fee = Fee::from_staking_token_amount((*fee).into()); - let account_group_id = app.fvk.account_group_id(); // this should be optional? or saved in the client statefully? + let wallet = app.fvk.wallet(); // this should be optional? or saved in the client statefully? let channel = app.pd_channel().await?; let view: &mut dyn ViewClient = app @@ -550,7 +552,7 @@ impl TxCmd { .context("view service must be initialized")?; let params = view.app_params().await?; - let current_height = view.status(account_group_id).await?.sync_height; + let current_height = view.status(wallet).await?.sync_height; let mut client = ChainQueryServiceClient::new(channel.clone()); let current_epoch = client .epoch_by_height(EpochByHeightRequest { @@ -564,9 +566,7 @@ impl TxCmd { // Query the view client for the list of undelegations that are ready to be claimed. // We want to claim them into the same address index that currently holds the tokens. - let notes = view - .unspent_notes_by_address_and_asset(account_group_id) - .await?; + let notes = view.unspent_notes_by_address_and_asset(wallet).await?; for (address_index, notes_by_asset) in notes.into_iter() { for (token, notes) in @@ -627,7 +627,7 @@ impl TxCmd { app.view .as_mut() .context("view service must be initialized")?, - app.fvk.account_group_id(), + app.fvk.wallet(), address_index, ) .await?; @@ -648,7 +648,7 @@ impl TxCmd { .context("can't parse proposal file")?; let fee = Fee::from_staking_token_amount((*fee).into()); let plan = plan::proposal_submit( - app.fvk.account_group_id(), + app.fvk.wallet(), app.view .as_mut() .context("view service must be initialized")?, @@ -668,7 +668,7 @@ impl TxCmd { }) => { let fee = Fee::from_staking_token_amount((*fee).into()); let plan = plan::proposal_withdraw( - app.fvk.account_group_id(), + app.fvk.wallet(), app.view .as_mut() .context("view service must be initialized")?, @@ -755,7 +755,7 @@ impl TxCmd { app.view .as_mut() .context("view service must be initialized")?, - app.fvk.account_group_id(), + app.fvk.wallet(), AddressIndex::new(*source), ) .await?; @@ -823,7 +823,7 @@ impl TxCmd { app.view .as_mut() .context("view service must be initialized")?, - app.fvk.account_group_id(), + app.fvk.wallet(), AddressIndex::new(*source), ) .await?; @@ -846,7 +846,7 @@ impl TxCmd { app.view .as_mut() .context("view service must be initialized")?, - app.fvk.account_group_id(), + app.fvk.wallet(), source, ) .await?; @@ -918,7 +918,7 @@ impl TxCmd { app.view .as_mut() .context("view service must be initialized")?, - app.fvk.account_group_id(), + app.fvk.wallet(), AddressIndex::new(*source), ) .await?; @@ -938,7 +938,7 @@ impl TxCmd { app.view .as_mut() .context("view service must be initialized")?, - app.fvk.account_group_id(), + app.fvk.wallet(), AddressIndex::new(*source), ) .await?; @@ -978,7 +978,7 @@ impl TxCmd { app.view .as_mut() .context("view service must be initialized")?, - app.fvk.account_group_id(), + app.fvk.wallet(), AddressIndex::new(*source), ) .await?; @@ -1052,7 +1052,7 @@ impl TxCmd { app.view .as_mut() .context("view service must be initialized")?, - app.fvk.account_group_id(), + app.fvk.wallet(), AddressIndex::new(*source), ) .await?; @@ -1103,7 +1103,7 @@ impl TxCmd { app.view .as_mut() .context("view service must be initialized")?, - app.fvk.account_group_id(), + app.fvk.wallet(), AddressIndex::new(*source), ) .await?; diff --git a/crates/bin/pcli/src/command/tx/replicate.rs b/crates/bin/pcli/src/command/tx/replicate.rs index ef8192130a..aeea2529ea 100644 --- a/crates/bin/pcli/src/command/tx/replicate.rs +++ b/crates/bin/pcli/src/command/tx/replicate.rs @@ -96,8 +96,8 @@ impl ConstantProduct { if !self.yes && !Confirm::new() - .with_prompt("In the solemn voice of Mandos, he who sets the fates of all, you hear a question,\nechoing like a whisper through the Halls of Waiting:\n\"Do you, in your heart of hearts, truly wish to proceed?\"") - .interact()? + .with_prompt("In the solemn voice of Mandos, he who sets the fates of all, you hear a question,\nechoing like a whisper through the Halls of Waiting:\n\"Do you, in your heart of hearts, truly wish to proceed?\"") + .interact()? { return Ok(()); } @@ -153,7 +153,7 @@ impl ConstantProduct { app.view .as_mut() .context("view service must be initialized")?, - app.fvk.account_group_id(), + app.fvk.wallet(), AddressIndex::new(self.source), ) .await?; diff --git a/crates/bin/pcli/src/command/validator.rs b/crates/bin/pcli/src/command/validator.rs index 19d1e81d09..40956b059d 100644 --- a/crates/bin/pcli/src/command/validator.rs +++ b/crates/bin/pcli/src/command/validator.rs @@ -149,9 +149,9 @@ impl ValidatorCmd { }; // Construct a new transaction and include the validator definition. - let account_group_id = app.fvk.account_group_id(); + let wallet = app.fvk.wallet(); let plan = plan::validator_definition( - account_group_id, + wallet, app.view .as_mut() .context("view service must be initialized")?, @@ -205,10 +205,10 @@ impl ValidatorCmd { // Construct a new transaction and include the validator definition. let fee = Fee::from_staking_token_amount((*fee).into()); - let account_group_id = app.fvk.account_group_id(); + let wallet = app.fvk.wallet(); let plan = plan::validator_vote( - account_group_id, + wallet, app.view .as_mut() .context("view service must be initialized")?, diff --git a/crates/bin/pcli/src/command/view/balance.rs b/crates/bin/pcli/src/command/view/balance.rs index 91d0dec0a3..51472c564e 100644 --- a/crates/bin/pcli/src/command/view/balance.rs +++ b/crates/bin/pcli/src/command/view/balance.rs @@ -3,6 +3,7 @@ use comfy_table::{presets, Table}; use penumbra_asset::{asset::Cache, Value}; use penumbra_keys::{keys::AddressIndex, FullViewingKey}; use penumbra_view::ViewClient; + #[derive(Debug, clap::Args)] pub struct BalanceCmd { #[clap(long)] @@ -24,7 +25,7 @@ impl BalanceCmd { let rows: Vec<(Option, Value)> = if self.by_note { let notes = view - .unspent_notes_by_address_and_asset(fvk.account_group_id()) + .unspent_notes_by_address_and_asset(fvk.wallet()) .await?; notes @@ -40,7 +41,7 @@ impl BalanceCmd { .collect() } else { let notes = view - .unspent_notes_by_address_and_asset(fvk.account_group_id()) + .unspent_notes_by_address_and_asset(fvk.wallet()) .await?; notes diff --git a/crates/bin/pcli/src/command/view/staked.rs b/crates/bin/pcli/src/command/view/staked.rs index 3dd8a90aa7..06da650549 100644 --- a/crates/bin/pcli/src/command/view/staked.rs +++ b/crates/bin/pcli/src/command/view/staked.rs @@ -43,9 +43,9 @@ impl StakedCmd { .map(TryInto::try_into) .collect::, _>>()?; - let account_group_id = full_viewing_key.account_group_id(); + let wallet = full_viewing_key.wallet(); let notes = view_client - .unspent_notes_by_asset_and_address(account_group_id) + .unspent_notes_by_asset_and_address(wallet) .await?; let mut total = 0u128; diff --git a/crates/bin/pcli/src/main.rs b/crates/bin/pcli/src/main.rs index 262a492202..3fa172227e 100644 --- a/crates/bin/pcli/src/main.rs +++ b/crates/bin/pcli/src/main.rs @@ -1,5 +1,6 @@ #![deny(clippy::unwrap_used)] #![allow(clippy::clone_on_copy)] + use std::fs; use anyhow::{Context, Result}; @@ -49,7 +50,7 @@ impl App { async fn sync(&mut self) -> Result<()> { let mut status_stream = ViewClient::status_stream( self.view.as_mut().expect("view service initialized"), - self.fvk.account_group_id(), + self.fvk.wallet(), ) .await?; diff --git a/crates/bin/pclientd/tests/network_integration.rs b/crates/bin/pclientd/tests/network_integration.rs index e0bfde4603..8ea5f98830 100644 --- a/crates/bin/pclientd/tests/network_integration.rs +++ b/crates/bin/pclientd/tests/network_integration.rs @@ -83,7 +83,7 @@ async fn transaction_send_flow() -> anyhow::Result<()> { // 4. Use the view protocol to wait for it to sync. let mut status_stream = (&mut view_client as &mut dyn ViewClient) - .status_stream(test_keys::FULL_VIEWING_KEY.account_group_id()) + .status_stream(test_keys::FULL_VIEWING_KEY.wallet()) .await?; while let Some(item) = status_stream.as_mut().next().await.transpose()? { tracing::debug!(?item); @@ -220,7 +220,7 @@ async fn swap_claim_flow() -> anyhow::Result<()> { // 4. Use the view protocol to wait for it to sync. let mut status_stream = (&mut view_client as &mut dyn ViewClient) - .status_stream(test_keys::FULL_VIEWING_KEY.account_group_id()) + .status_stream(test_keys::FULL_VIEWING_KEY.wallet()) .await?; while let Some(item) = status_stream.as_mut().next().await.transpose()? { tracing::debug!(?item); @@ -317,7 +317,7 @@ async fn swap_claim_flow() -> anyhow::Result<()> { // 6. Use the view protocol to wait for it to sync. let mut status_stream = (&mut view_client as &mut dyn ViewClient) - .status_stream(test_keys::FULL_VIEWING_KEY.account_group_id()) + .status_stream(test_keys::FULL_VIEWING_KEY.wallet()) .await?; while let Some(item) = status_stream.as_mut().next().await.transpose()? { tracing::debug!(?item); @@ -326,7 +326,7 @@ async fn swap_claim_flow() -> anyhow::Result<()> { // Ensure we can fetch the SwapRecord with the claimable swap. let _swap_record = (&mut view_client as &mut dyn ViewClient) .swap_by_commitment( - test_keys::FULL_VIEWING_KEY.account_group_id(), + test_keys::FULL_VIEWING_KEY.wallet(), swap_plaintext.swap_commitment(), ) .await?; diff --git a/crates/core/component/chain/src/lib.rs b/crates/core/component/chain/src/lib.rs index 804cf4824a..35215b2d74 100644 --- a/crates/core/component/chain/src/lib.rs +++ b/crates/core/component/chain/src/lib.rs @@ -57,11 +57,12 @@ pub mod test_keys { pub static FULL_VIEWING_KEY: Lazy = Lazy::new(|| SPEND_KEY.full_viewing_key().clone()); - pub static ACCOUNT_ID: Lazy = Lazy::new(|| FULL_VIEWING_KEY.account_group_id()); + pub static ACCOUNT_ID: Lazy = Lazy::new(|| FULL_VIEWING_KEY.wallet()); } // Located here at the bottom of the dep tree for convenience mod effect_hash; mod transaction; + pub use effect_hash::{EffectHash, EffectingData}; pub use transaction::TransactionContext; diff --git a/crates/core/keys/src/address/view.rs b/crates/core/keys/src/address/view.rs index d25110516a..5142e1b358 100644 --- a/crates/core/keys/src/address/view.rs +++ b/crates/core/keys/src/address/view.rs @@ -19,7 +19,7 @@ pub enum AddressView { Visible { address: Address, index: AddressIndex, - account_group_id: Wallet, + wallet: Wallet, }, } @@ -53,13 +53,13 @@ impl From for pb::AddressView { AddressView::Visible { address, index, - account_group_id, + wallet, } => Self { address_view: Some(pb::address_view::AddressView::Visible( pb::address_view::Visible { address: Some(address.into()), index: Some(index.into()), - account_group_id: Some(account_group_id.into()), + wallet: Some(wallet.into()), }, )), }, @@ -87,16 +87,14 @@ impl TryFrom for AddressView { .index .ok_or_else(|| anyhow::anyhow!("AddressView::Visible missing index field"))? .try_into()?; - let account_group_id = visible - .account_group_id - .ok_or_else(|| { - anyhow::anyhow!("AddressView::Visible missing account_group_id field") - })? + let wallet = visible + .wallet + .ok_or_else(|| anyhow::anyhow!("AddressView::Visible missing wallet field"))? .try_into()?; Ok(AddressView::Visible { address, index, - account_group_id, + wallet, }) } None => Err(anyhow::anyhow!("AddressView missing address_view field")), @@ -128,7 +126,7 @@ mod tests { AddressView::Visible { address: addr1_0, index: 0.into(), - account_group_id: fvk1.account_group_id(), + wallet: fvk1.wallet(), } ); assert_eq!( @@ -140,7 +138,7 @@ mod tests { AddressView::Visible { address: addr1_1, index: 1.into(), - account_group_id: fvk1.account_group_id(), + wallet: fvk1.wallet(), } ); assert_eq!( @@ -156,7 +154,7 @@ mod tests { AddressView::Visible { address: addr2_0, index: 0.into(), - account_group_id: fvk2.account_group_id(), + wallet: fvk2.wallet(), } ); assert_eq!( @@ -168,7 +166,7 @@ mod tests { AddressView::Visible { address: addr2_1, index: 1.into(), - account_group_id: fvk2.account_group_id(), + wallet: fvk2.wallet(), } ); } diff --git a/crates/core/keys/src/keys/fvk.rs b/crates/core/keys/src/keys/fvk.rs index 9c27f46996..cc83975624 100644 --- a/crates/core/keys/src/keys/fvk.rs +++ b/crates/core/keys/src/keys/fvk.rs @@ -57,11 +57,11 @@ impl FullViewingKey { /// Views the structure of the supplied address with this viewing key. pub fn view_address(&self, address: Address) -> AddressView { // WART: this can't cleanly forward to a method on the IVK, - // because the IVK doesn't know the AccountGroupId. + // because the IVK doesn't know the Wallet. if self.incoming().views_address(&address) { AddressView::Visible { index: self.incoming().index_for_diversifier(address.diversifier()), - account_group_id: self.account_group_id(), + wallet: self.wallet(), address, } } else { @@ -125,7 +125,7 @@ impl FullViewingKey { } /// Hashes the full viewing key into an [`Wallet`]. - pub fn account_group_id(&self) -> Wallet { + pub fn wallet(&self) -> Wallet { let hash_result = hash_2( &ACCOUNT_ID_DOMAIN_SEP, ( diff --git a/crates/core/keys/src/keys/wallet.rs b/crates/core/keys/src/keys/wallet.rs index b3d44bb147..21a56539bf 100644 --- a/crates/core/keys/src/keys/wallet.rs +++ b/crates/core/keys/src/keys/wallet.rs @@ -5,13 +5,13 @@ use penumbra_proto::{penumbra::core::keys::v1alpha1 as pb, serializers::bech32st /// The hash of a full viewing key, used as an account identifier. #[derive(Clone, Copy, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord)] -#[serde(try_from = "pb::AccountGroupId", into = "pb::AccountGroupId")] +#[serde(try_from = "pb::Wallet", into = "pb::Wallet")] pub struct Wallet(pub [u8; 32]); -impl TryFrom for Wallet { +impl TryFrom for Wallet { type Error = anyhow::Error; - fn try_from(value: v1alpha1::AccountGroupId) -> Result { + fn try_from(value: v1alpha1::Wallet) -> Result { Ok(Wallet( value .inner @@ -21,9 +21,9 @@ impl TryFrom for Wallet { } } -impl From for v1alpha1::AccountGroupId { - fn from(value: Wallet) -> v1alpha1::AccountGroupId { - v1alpha1::AccountGroupId { +impl From for v1alpha1::Wallet { + fn from(value: Wallet) -> v1alpha1::Wallet { + v1alpha1::Wallet { inner: value.0.to_vec(), } } diff --git a/crates/core/keys/tests/test_wallet.rs b/crates/core/keys/tests/test_wallet.rs index 3b8f9b9df3..2af661746d 100644 --- a/crates/core/keys/tests/test_wallet.rs +++ b/crates/core/keys/tests/test_wallet.rs @@ -10,12 +10,11 @@ fn wallet_to_bech32() { let seed = SeedPhrase::from_str("comfort ten front cycle churn burger oak absent rice ice urge result art couple benefit cabbage frequent obscure hurry trick segment cool job debate").unwrap(); let spend_key = SpendKey::from_seed_phrase_bip39(seed, 0); let fvk = spend_key.full_viewing_key(); - let wallet = fvk.account_group_id(); + let wallet = fvk.wallet(); let actual_bech32_str = wallet.to_string(); let expected_bech32_str = - "penumbraaccountgroupid15r7q7qsf3hhsgj0g530n7ng9acdacmmx9ajknjz38dyt90u9gcgs767wla" - .to_string(); + "penumbrawallet15r7q7qsf3hhsgj0g530n7ng9acdacmmx9ajknjz38dyt90u9gcgsauy5df".to_string(); assert_eq!(expected_bech32_str, actual_bech32_str); diff --git a/crates/custody/src/request.rs b/crates/custody/src/request.rs index 869383c0b6..fbe144ed93 100644 --- a/crates/custody/src/request.rs +++ b/crates/custody/src/request.rs @@ -10,7 +10,7 @@ pub struct AuthorizeRequest { /// The transaction plan to authorize. pub plan: TransactionPlan, /// Identifies the FVK (and hence the spend authorization key) to use for signing. - pub account_group_id: Option, + pub wallet: Option, /// Optionally, pre-authorization data, if required by the custodian. pub pre_authorizations: Vec, } @@ -31,7 +31,7 @@ impl TryFrom for AuthorizeRequest { .plan .ok_or_else(|| anyhow::anyhow!("missing plan"))? .try_into()?, - account_group_id: value.account_group_id.map(TryInto::try_into).transpose()?, + wallet: value.wallet.map(TryInto::try_into).transpose()?, pre_authorizations: value .pre_authorizations .into_iter() @@ -45,7 +45,7 @@ impl From for pb::AuthorizeRequest { fn from(value: AuthorizeRequest) -> pb::AuthorizeRequest { Self { plan: Some(value.plan.into()), - account_group_id: value.account_group_id.map(Into::into), + wallet: value.wallet.map(Into::into), pre_authorizations: value .pre_authorizations .into_iter() diff --git a/crates/proto/src/gen/penumbra.core.keys.v1alpha1.rs b/crates/proto/src/gen/penumbra.core.keys.v1alpha1.rs index c86101272f..221aca24c1 100644 --- a/crates/proto/src/gen/penumbra.core.keys.v1alpha1.rs +++ b/crates/proto/src/gen/penumbra.core.keys.v1alpha1.rs @@ -33,7 +33,7 @@ pub mod address_view { #[prost(message, optional, tag = "2")] pub index: ::core::option::Option, #[prost(message, optional, tag = "3")] - pub account_group_id: ::core::option::Option, + pub wallet: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -76,7 +76,7 @@ pub struct FullViewingKey { } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct AccountGroupId { +pub struct Wallet { #[prost(bytes = "vec", tag = "1")] pub inner: ::prost::alloc::vec::Vec, } diff --git a/crates/proto/src/gen/penumbra.core.keys.v1alpha1.serde.rs b/crates/proto/src/gen/penumbra.core.keys.v1alpha1.serde.rs index ded992ec24..7575d6e798 100644 --- a/crates/proto/src/gen/penumbra.core.keys.v1alpha1.serde.rs +++ b/crates/proto/src/gen/penumbra.core.keys.v1alpha1.serde.rs @@ -1,96 +1,3 @@ -impl serde::Serialize for AccountGroupId { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.inner.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("penumbra.core.keys.v1alpha1.AccountGroupId", len)?; - if !self.inner.is_empty() { - struct_ser.serialize_field("inner", pbjson::private::base64::encode(&self.inner).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for AccountGroupId { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "inner", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Inner, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "inner" => Ok(GeneratedField::Inner), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = AccountGroupId; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct penumbra.core.keys.v1alpha1.AccountGroupId") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut inner__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Inner => { - if inner__.is_some() { - return Err(serde::de::Error::duplicate_field("inner")); - } - inner__ = - Some(map.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) - ; - } - } - } - Ok(AccountGroupId { - inner: inner__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("penumbra.core.keys.v1alpha1.AccountGroupId", FIELDS, GeneratedVisitor) - } -} impl serde::Serialize for Address { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -528,7 +435,7 @@ impl serde::Serialize for address_view::Visible { if self.index.is_some() { len += 1; } - if self.account_group_id.is_some() { + if self.wallet.is_some() { len += 1; } let mut struct_ser = serializer.serialize_struct("penumbra.core.keys.v1alpha1.AddressView.Visible", len)?; @@ -538,8 +445,8 @@ impl serde::Serialize for address_view::Visible { if let Some(v) = self.index.as_ref() { struct_ser.serialize_field("index", v)?; } - if let Some(v) = self.account_group_id.as_ref() { - struct_ser.serialize_field("accountGroupId", v)?; + if let Some(v) = self.wallet.as_ref() { + struct_ser.serialize_field("wallet", v)?; } struct_ser.end() } @@ -553,15 +460,14 @@ impl<'de> serde::Deserialize<'de> for address_view::Visible { const FIELDS: &[&str] = &[ "address", "index", - "account_group_id", - "accountGroupId", + "wallet", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { Address, Index, - AccountGroupId, + Wallet, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -585,7 +491,7 @@ impl<'de> serde::Deserialize<'de> for address_view::Visible { match value { "address" => Ok(GeneratedField::Address), "index" => Ok(GeneratedField::Index), - "accountGroupId" | "account_group_id" => Ok(GeneratedField::AccountGroupId), + "wallet" => Ok(GeneratedField::Wallet), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -607,7 +513,7 @@ impl<'de> serde::Deserialize<'de> for address_view::Visible { { let mut address__ = None; let mut index__ = None; - let mut account_group_id__ = None; + let mut wallet__ = None; while let Some(k) = map.next_key()? { match k { GeneratedField::Address => { @@ -622,18 +528,18 @@ impl<'de> serde::Deserialize<'de> for address_view::Visible { } index__ = map.next_value()?; } - GeneratedField::AccountGroupId => { - if account_group_id__.is_some() { - return Err(serde::de::Error::duplicate_field("accountGroupId")); + GeneratedField::Wallet => { + if wallet__.is_some() { + return Err(serde::de::Error::duplicate_field("wallet")); } - account_group_id__ = map.next_value()?; + wallet__ = map.next_value()?; } } } Ok(address_view::Visible { address: address__, index: index__, - account_group_id: account_group_id__, + wallet: wallet__, }) } } @@ -1384,3 +1290,96 @@ impl<'de> serde::Deserialize<'de> for SpendVerificationKey { deserializer.deserialize_struct("penumbra.core.keys.v1alpha1.SpendVerificationKey", FIELDS, GeneratedVisitor) } } +impl serde::Serialize for Wallet { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.inner.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("penumbra.core.keys.v1alpha1.Wallet", len)?; + if !self.inner.is_empty() { + struct_ser.serialize_field("inner", pbjson::private::base64::encode(&self.inner).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Wallet { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "inner", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Inner, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "inner" => Ok(GeneratedField::Inner), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Wallet; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct penumbra.core.keys.v1alpha1.Wallet") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut inner__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Inner => { + if inner__.is_some() { + return Err(serde::de::Error::duplicate_field("inner")); + } + inner__ = + Some(map.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0) + ; + } + } + } + Ok(Wallet { + inner: inner__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("penumbra.core.keys.v1alpha1.Wallet", FIELDS, GeneratedVisitor) + } +} diff --git a/crates/proto/src/gen/penumbra.custody.v1alpha1.rs b/crates/proto/src/gen/penumbra.custody.v1alpha1.rs index 64aab5fd45..d13909bcd5 100644 --- a/crates/proto/src/gen/penumbra.custody.v1alpha1.rs +++ b/crates/proto/src/gen/penumbra.custody.v1alpha1.rs @@ -8,9 +8,7 @@ pub struct AuthorizeRequest { >, /// Identifies the FVK (and hence the spend authorization key) to use for signing. #[prost(message, optional, tag = "2")] - pub account_group_id: ::core::option::Option< - super::super::core::keys::v1alpha1::AccountGroupId, - >, + pub wallet: ::core::option::Option, /// Optionally, pre-authorization data, if required by the custodian. /// /// Multiple `PreAuthorization` packets can be included in a single request, diff --git a/crates/proto/src/gen/penumbra.custody.v1alpha1.serde.rs b/crates/proto/src/gen/penumbra.custody.v1alpha1.serde.rs index f0446529f6..47f65b0cc9 100644 --- a/crates/proto/src/gen/penumbra.custody.v1alpha1.serde.rs +++ b/crates/proto/src/gen/penumbra.custody.v1alpha1.serde.rs @@ -9,7 +9,7 @@ impl serde::Serialize for AuthorizeRequest { if self.plan.is_some() { len += 1; } - if self.account_group_id.is_some() { + if self.wallet.is_some() { len += 1; } if !self.pre_authorizations.is_empty() { @@ -19,8 +19,8 @@ impl serde::Serialize for AuthorizeRequest { if let Some(v) = self.plan.as_ref() { struct_ser.serialize_field("plan", v)?; } - if let Some(v) = self.account_group_id.as_ref() { - struct_ser.serialize_field("accountGroupId", v)?; + if let Some(v) = self.wallet.as_ref() { + struct_ser.serialize_field("wallet", v)?; } if !self.pre_authorizations.is_empty() { struct_ser.serialize_field("preAuthorizations", &self.pre_authorizations)?; @@ -36,8 +36,7 @@ impl<'de> serde::Deserialize<'de> for AuthorizeRequest { { const FIELDS: &[&str] = &[ "plan", - "account_group_id", - "accountGroupId", + "wallet", "pre_authorizations", "preAuthorizations", ]; @@ -45,7 +44,7 @@ impl<'de> serde::Deserialize<'de> for AuthorizeRequest { #[allow(clippy::enum_variant_names)] enum GeneratedField { Plan, - AccountGroupId, + Wallet, PreAuthorizations, } impl<'de> serde::Deserialize<'de> for GeneratedField { @@ -69,7 +68,7 @@ impl<'de> serde::Deserialize<'de> for AuthorizeRequest { { match value { "plan" => Ok(GeneratedField::Plan), - "accountGroupId" | "account_group_id" => Ok(GeneratedField::AccountGroupId), + "wallet" => Ok(GeneratedField::Wallet), "preAuthorizations" | "pre_authorizations" => Ok(GeneratedField::PreAuthorizations), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } @@ -91,7 +90,7 @@ impl<'de> serde::Deserialize<'de> for AuthorizeRequest { V: serde::de::MapAccess<'de>, { let mut plan__ = None; - let mut account_group_id__ = None; + let mut wallet__ = None; let mut pre_authorizations__ = None; while let Some(k) = map.next_key()? { match k { @@ -101,11 +100,11 @@ impl<'de> serde::Deserialize<'de> for AuthorizeRequest { } plan__ = map.next_value()?; } - GeneratedField::AccountGroupId => { - if account_group_id__.is_some() { - return Err(serde::de::Error::duplicate_field("accountGroupId")); + GeneratedField::Wallet => { + if wallet__.is_some() { + return Err(serde::de::Error::duplicate_field("wallet")); } - account_group_id__ = map.next_value()?; + wallet__ = map.next_value()?; } GeneratedField::PreAuthorizations => { if pre_authorizations__.is_some() { @@ -117,7 +116,7 @@ impl<'de> serde::Deserialize<'de> for AuthorizeRequest { } Ok(AuthorizeRequest { plan: plan__, - account_group_id: account_group_id__, + wallet: wallet__, pre_authorizations: pre_authorizations__.unwrap_or_default(), }) } diff --git a/crates/proto/src/gen/penumbra.narsil.ledger.v1alpha1.rs b/crates/proto/src/gen/penumbra.narsil.ledger.v1alpha1.rs index 20a5d8db90..ea28ba1af1 100644 --- a/crates/proto/src/gen/penumbra.narsil.ledger.v1alpha1.rs +++ b/crates/proto/src/gen/penumbra.narsil.ledger.v1alpha1.rs @@ -124,22 +124,22 @@ pub struct GenesisData { #[prost(uint32, tag = "2")] pub threshold: u32, } -/// Describes the Penumbra account group jointly controlled by the Narsil instance. +/// Describes the Penumbra wallet jointly controlled by the Narsil instance. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct AccountGroupInfo { +pub struct WalletInfo { /// The full viewing key for the shared account. /// /// In the Penumbra key hierarchy, this is the highest-authority key below - /// spend authority, and allows deriving all subkeys for all accounts in the - /// account group. It is replicated across all shards. + /// spend authority, and allows deriving all subkeys for all accounts in the wallet. + /// It is replicated across all shards. /// /// The spend verification key component is the `PK` in the FROST I-D. #[prost(message, optional, tag = "1")] pub full_viewing_key: ::core::option::Option< super::super::super::core::keys::v1alpha1::FullViewingKey, >, - /// Describes the participants in the account group. + /// Describes the participants in the wallet. #[prost(message, repeated, tag = "2")] pub participants: ::prost::alloc::vec::Vec, } @@ -510,7 +510,7 @@ pub mod dkg_state { #[prost(message, repeated, tag = "2")] pub round_2_messages: ::prost::alloc::vec::Vec, } - /// The DKG has finished successfully, producing the jointly-controlled `AccountGroupInfo`. + /// The DKG has finished successfully, producing the jointly-controlled `WalletInfo`. /// /// Unlike the signing ceremony, we don't record a failure case here: if the DKG fails, we abort the entire ledger. #[allow(clippy::derive_partial_eq_without_eq)] @@ -522,9 +522,9 @@ pub mod dkg_state { /// A list of messages received during round 2. #[prost(message, repeated, tag = "2")] pub round_2_messages: ::prost::alloc::vec::Vec, - /// The jointly-controlled `AccountGroupInfo` resulting from the DKG. + /// The jointly-controlled `WalletInfo` resulting from the DKG. #[prost(message, optional, tag = "3")] - pub account_group_info: ::core::option::Option, + pub wallet_info: ::core::option::Option, } } /// Generated client implementations. diff --git a/crates/proto/src/gen/penumbra.narsil.ledger.v1alpha1.serde.rs b/crates/proto/src/gen/penumbra.narsil.ledger.v1alpha1.serde.rs index 20788c13cd..bf4a5a8fb5 100644 --- a/crates/proto/src/gen/penumbra.narsil.ledger.v1alpha1.serde.rs +++ b/crates/proto/src/gen/penumbra.narsil.ledger.v1alpha1.serde.rs @@ -1,112 +1,3 @@ -impl serde::Serialize for AccountGroupInfo { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if self.full_viewing_key.is_some() { - len += 1; - } - if !self.participants.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("penumbra.narsil.ledger.v1alpha1.AccountGroupInfo", len)?; - if let Some(v) = self.full_viewing_key.as_ref() { - struct_ser.serialize_field("fullViewingKey", v)?; - } - if !self.participants.is_empty() { - struct_ser.serialize_field("participants", &self.participants)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for AccountGroupInfo { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "full_viewing_key", - "fullViewingKey", - "participants", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - FullViewingKey, - Participants, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "fullViewingKey" | "full_viewing_key" => Ok(GeneratedField::FullViewingKey), - "participants" => Ok(GeneratedField::Participants), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = AccountGroupInfo; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct penumbra.narsil.ledger.v1alpha1.AccountGroupInfo") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut full_viewing_key__ = None; - let mut participants__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::FullViewingKey => { - if full_viewing_key__.is_some() { - return Err(serde::de::Error::duplicate_field("fullViewingKey")); - } - full_viewing_key__ = map.next_value()?; - } - GeneratedField::Participants => { - if participants__.is_some() { - return Err(serde::de::Error::duplicate_field("participants")); - } - participants__ = Some(map.next_value()?); - } - } - } - Ok(AccountGroupInfo { - full_viewing_key: full_viewing_key__, - participants: participants__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("penumbra.narsil.ledger.v1alpha1.AccountGroupInfo", FIELDS, GeneratedVisitor) - } -} impl serde::Serialize for AuthorizeCommitment { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -2387,7 +2278,7 @@ impl serde::Serialize for dkg_state::Finished { if !self.round_2_messages.is_empty() { len += 1; } - if self.account_group_info.is_some() { + if self.wallet_info.is_some() { len += 1; } let mut struct_ser = serializer.serialize_struct("penumbra.narsil.ledger.v1alpha1.DkgState.Finished", len)?; @@ -2397,8 +2288,8 @@ impl serde::Serialize for dkg_state::Finished { if !self.round_2_messages.is_empty() { struct_ser.serialize_field("round2Messages", &self.round_2_messages)?; } - if let Some(v) = self.account_group_info.as_ref() { - struct_ser.serialize_field("accountGroupInfo", v)?; + if let Some(v) = self.wallet_info.as_ref() { + struct_ser.serialize_field("walletInfo", v)?; } struct_ser.end() } @@ -2414,15 +2305,15 @@ impl<'de> serde::Deserialize<'de> for dkg_state::Finished { "round1Messages", "round_2_messages", "round2Messages", - "account_group_info", - "accountGroupInfo", + "wallet_info", + "walletInfo", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { Round1Messages, Round2Messages, - AccountGroupInfo, + WalletInfo, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -2446,7 +2337,7 @@ impl<'de> serde::Deserialize<'de> for dkg_state::Finished { match value { "round1Messages" | "round_1_messages" => Ok(GeneratedField::Round1Messages), "round2Messages" | "round_2_messages" => Ok(GeneratedField::Round2Messages), - "accountGroupInfo" | "account_group_info" => Ok(GeneratedField::AccountGroupInfo), + "walletInfo" | "wallet_info" => Ok(GeneratedField::WalletInfo), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -2468,7 +2359,7 @@ impl<'de> serde::Deserialize<'de> for dkg_state::Finished { { let mut round_1_messages__ = None; let mut round_2_messages__ = None; - let mut account_group_info__ = None; + let mut wallet_info__ = None; while let Some(k) = map.next_key()? { match k { GeneratedField::Round1Messages => { @@ -2483,18 +2374,18 @@ impl<'de> serde::Deserialize<'de> for dkg_state::Finished { } round_2_messages__ = Some(map.next_value()?); } - GeneratedField::AccountGroupInfo => { - if account_group_info__.is_some() { - return Err(serde::de::Error::duplicate_field("accountGroupInfo")); + GeneratedField::WalletInfo => { + if wallet_info__.is_some() { + return Err(serde::de::Error::duplicate_field("walletInfo")); } - account_group_info__ = map.next_value()?; + wallet_info__ = map.next_value()?; } } } Ok(dkg_state::Finished { round_1_messages: round_1_messages__.unwrap_or_default(), round_2_messages: round_2_messages__.unwrap_or_default(), - account_group_info: account_group_info__, + wallet_info: wallet_info__, }) } } @@ -4319,3 +4210,112 @@ impl<'de> serde::Deserialize<'de> for ShardOperator { deserializer.deserialize_struct("penumbra.narsil.ledger.v1alpha1.ShardOperator", FIELDS, GeneratedVisitor) } } +impl serde::Serialize for WalletInfo { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.full_viewing_key.is_some() { + len += 1; + } + if !self.participants.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("penumbra.narsil.ledger.v1alpha1.WalletInfo", len)?; + if let Some(v) = self.full_viewing_key.as_ref() { + struct_ser.serialize_field("fullViewingKey", v)?; + } + if !self.participants.is_empty() { + struct_ser.serialize_field("participants", &self.participants)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for WalletInfo { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "full_viewing_key", + "fullViewingKey", + "participants", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + FullViewingKey, + Participants, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "fullViewingKey" | "full_viewing_key" => Ok(GeneratedField::FullViewingKey), + "participants" => Ok(GeneratedField::Participants), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = WalletInfo; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct penumbra.narsil.ledger.v1alpha1.WalletInfo") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut full_viewing_key__ = None; + let mut participants__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::FullViewingKey => { + if full_viewing_key__.is_some() { + return Err(serde::de::Error::duplicate_field("fullViewingKey")); + } + full_viewing_key__ = map.next_value()?; + } + GeneratedField::Participants => { + if participants__.is_some() { + return Err(serde::de::Error::duplicate_field("participants")); + } + participants__ = Some(map.next_value()?); + } + } + } + Ok(WalletInfo { + full_viewing_key: full_viewing_key__, + participants: participants__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("penumbra.narsil.ledger.v1alpha1.WalletInfo", FIELDS, GeneratedVisitor) + } +} diff --git a/crates/proto/src/gen/penumbra.view.v1alpha1.rs b/crates/proto/src/gen/penumbra.view.v1alpha1.rs index bb07b85248..d4e1668a3c 100644 --- a/crates/proto/src/gen/penumbra.view.v1alpha1.rs +++ b/crates/proto/src/gen/penumbra.view.v1alpha1.rs @@ -62,11 +62,9 @@ pub struct TransactionPlannerRequest { /// If present, only spends funds from the given account. #[prost(message, optional, tag = "4")] pub source: ::core::option::Option, - /// Optionally identifies the account group to query. + /// Optionally identifies the wallet to query. #[prost(message, optional, tag = "14")] - pub account_group_id: ::core::option::Option< - super::super::core::keys::v1alpha1::AccountGroupId, - >, + pub wallet: ::core::option::Option, /// Request contents #[prost(message, repeated, tag = "20")] pub outputs: ::prost::alloc::vec::Vec, @@ -314,11 +312,9 @@ pub struct ViewAuthResponse { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StatusRequest { - /// Identifies the account group to query. + /// Identifies the wallet to query. #[prost(message, optional, tag = "14")] - pub account_group_id: ::core::option::Option< - super::super::core::keys::v1alpha1::AccountGroupId, - >, + pub wallet: ::core::option::Option, } /// Returns the status of the view service and whether it is synchronized with the chain state. #[allow(clippy::derive_partial_eq_without_eq)] @@ -335,11 +331,9 @@ pub struct StatusResponse { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StatusStreamRequest { - /// Identifies the account group to query. + /// Identifies the wallet to query. #[prost(message, optional, tag = "14")] - pub account_group_id: ::core::option::Option< - super::super::core::keys::v1alpha1::AccountGroupId, - >, + pub wallet: ::core::option::Option, } /// A streaming sync status update #[allow(clippy::derive_partial_eq_without_eq)] @@ -375,11 +369,9 @@ pub struct NotesRequest { pub amount_to_spend: ::core::option::Option< super::super::core::num::v1alpha1::Amount, >, - /// Identifies the account group to query. + /// Identifies the wallet to query. #[prost(message, optional, tag = "14")] - pub account_group_id: ::core::option::Option< - super::super::core::keys::v1alpha1::AccountGroupId, - >, + pub wallet: ::core::option::Option, } /// A query for notes to be used for voting on a proposal. #[allow(clippy::derive_partial_eq_without_eq)] @@ -393,11 +385,9 @@ pub struct NotesForVotingRequest { pub address_index: ::core::option::Option< super::super::core::keys::v1alpha1::AddressIndex, >, - /// Identifies the account group to query. + /// Identifies the wallet to query. #[prost(message, optional, tag = "14")] - pub account_group_id: ::core::option::Option< - super::super::core::keys::v1alpha1::AccountGroupId, - >, + pub wallet: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -412,11 +402,9 @@ pub struct WitnessRequest { pub transaction_plan: ::core::option::Option< super::super::core::transaction::v1alpha1::TransactionPlan, >, - /// Identifies the account group to query. + /// Identifies the wallet to query. #[prost(message, optional, tag = "14")] - pub account_group_id: ::core::option::Option< - super::super::core::keys::v1alpha1::AccountGroupId, - >, + pub wallet: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -518,11 +506,9 @@ pub struct NoteByCommitmentRequest { /// If set to true, waits to return until the requested note is detected. #[prost(bool, tag = "3")] pub await_detection: bool, - /// Identifies the account group to query. + /// Identifies the wallet to query. #[prost(message, optional, tag = "14")] - pub account_group_id: ::core::option::Option< - super::super::core::keys::v1alpha1::AccountGroupId, - >, + pub wallet: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -540,11 +526,9 @@ pub struct SwapByCommitmentRequest { /// If set to true, waits to return until the requested swap is detected. #[prost(bool, tag = "3")] pub await_detection: bool, - /// Identifies the account group to query. + /// Identifies the wallet to query. #[prost(message, optional, tag = "14")] - pub account_group_id: ::core::option::Option< - super::super::core::keys::v1alpha1::AccountGroupId, - >, + pub wallet: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -555,11 +539,9 @@ pub struct SwapByCommitmentResponse { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UnclaimedSwapsRequest { - /// Identifies the account group to query. + /// Identifies the wallet to query. #[prost(message, optional, tag = "1")] - pub account_group_id: ::core::option::Option< - super::super::core::keys::v1alpha1::AccountGroupId, - >, + pub wallet: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -576,11 +558,9 @@ pub struct NullifierStatusRequest { >, #[prost(bool, tag = "3")] pub await_detection: bool, - /// Identifies the account group to query. + /// Identifies the wallet to query. #[prost(message, optional, tag = "14")] - pub account_group_id: ::core::option::Option< - super::super::core::keys::v1alpha1::AccountGroupId, - >, + pub wallet: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -758,7 +738,7 @@ pub mod view_protocol_service_client { /// responsible for synchronizing and scanning the public chain state with one or /// more full viewing keys. /// - /// View protocol requests optionally include the account group ID, used to + /// View protocol requests optionally include the wallet ID, used to /// identify which set of data to query. #[derive(Debug, Clone)] pub struct ViewProtocolServiceClient { @@ -1605,7 +1585,7 @@ pub mod view_protocol_service_server { /// responsible for synchronizing and scanning the public chain state with one or /// more full viewing keys. /// - /// View protocol requests optionally include the account group ID, used to + /// View protocol requests optionally include the wallet ID, used to /// identify which set of data to query. #[derive(Debug)] pub struct ViewProtocolServiceServer { diff --git a/crates/proto/src/gen/penumbra.view.v1alpha1.serde.rs b/crates/proto/src/gen/penumbra.view.v1alpha1.serde.rs index 028f830ec4..4792a4317d 100644 --- a/crates/proto/src/gen/penumbra.view.v1alpha1.serde.rs +++ b/crates/proto/src/gen/penumbra.view.v1alpha1.serde.rs @@ -1851,7 +1851,7 @@ impl serde::Serialize for NoteByCommitmentRequest { if self.await_detection { len += 1; } - if self.account_group_id.is_some() { + if self.wallet.is_some() { len += 1; } let mut struct_ser = serializer.serialize_struct("penumbra.view.v1alpha1.NoteByCommitmentRequest", len)?; @@ -1861,8 +1861,8 @@ impl serde::Serialize for NoteByCommitmentRequest { if self.await_detection { struct_ser.serialize_field("awaitDetection", &self.await_detection)?; } - if let Some(v) = self.account_group_id.as_ref() { - struct_ser.serialize_field("accountGroupId", v)?; + if let Some(v) = self.wallet.as_ref() { + struct_ser.serialize_field("wallet", v)?; } struct_ser.end() } @@ -1878,15 +1878,14 @@ impl<'de> serde::Deserialize<'de> for NoteByCommitmentRequest { "noteCommitment", "await_detection", "awaitDetection", - "account_group_id", - "accountGroupId", + "wallet", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { NoteCommitment, AwaitDetection, - AccountGroupId, + Wallet, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -1910,7 +1909,7 @@ impl<'de> serde::Deserialize<'de> for NoteByCommitmentRequest { match value { "noteCommitment" | "note_commitment" => Ok(GeneratedField::NoteCommitment), "awaitDetection" | "await_detection" => Ok(GeneratedField::AwaitDetection), - "accountGroupId" | "account_group_id" => Ok(GeneratedField::AccountGroupId), + "wallet" => Ok(GeneratedField::Wallet), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -1932,7 +1931,7 @@ impl<'de> serde::Deserialize<'de> for NoteByCommitmentRequest { { let mut note_commitment__ = None; let mut await_detection__ = None; - let mut account_group_id__ = None; + let mut wallet__ = None; while let Some(k) = map.next_key()? { match k { GeneratedField::NoteCommitment => { @@ -1947,18 +1946,18 @@ impl<'de> serde::Deserialize<'de> for NoteByCommitmentRequest { } await_detection__ = Some(map.next_value()?); } - GeneratedField::AccountGroupId => { - if account_group_id__.is_some() { - return Err(serde::de::Error::duplicate_field("accountGroupId")); + GeneratedField::Wallet => { + if wallet__.is_some() { + return Err(serde::de::Error::duplicate_field("wallet")); } - account_group_id__ = map.next_value()?; + wallet__ = map.next_value()?; } } } Ok(NoteByCommitmentRequest { note_commitment: note_commitment__, await_detection: await_detection__.unwrap_or_default(), - account_group_id: account_group_id__, + wallet: wallet__, }) } } @@ -2071,7 +2070,7 @@ impl serde::Serialize for NotesForVotingRequest { if self.address_index.is_some() { len += 1; } - if self.account_group_id.is_some() { + if self.wallet.is_some() { len += 1; } let mut struct_ser = serializer.serialize_struct("penumbra.view.v1alpha1.NotesForVotingRequest", len)?; @@ -2081,8 +2080,8 @@ impl serde::Serialize for NotesForVotingRequest { if let Some(v) = self.address_index.as_ref() { struct_ser.serialize_field("addressIndex", v)?; } - if let Some(v) = self.account_group_id.as_ref() { - struct_ser.serialize_field("accountGroupId", v)?; + if let Some(v) = self.wallet.as_ref() { + struct_ser.serialize_field("wallet", v)?; } struct_ser.end() } @@ -2098,15 +2097,14 @@ impl<'de> serde::Deserialize<'de> for NotesForVotingRequest { "votableAtHeight", "address_index", "addressIndex", - "account_group_id", - "accountGroupId", + "wallet", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { VotableAtHeight, AddressIndex, - AccountGroupId, + Wallet, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -2130,7 +2128,7 @@ impl<'de> serde::Deserialize<'de> for NotesForVotingRequest { match value { "votableAtHeight" | "votable_at_height" => Ok(GeneratedField::VotableAtHeight), "addressIndex" | "address_index" => Ok(GeneratedField::AddressIndex), - "accountGroupId" | "account_group_id" => Ok(GeneratedField::AccountGroupId), + "wallet" => Ok(GeneratedField::Wallet), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -2152,7 +2150,7 @@ impl<'de> serde::Deserialize<'de> for NotesForVotingRequest { { let mut votable_at_height__ = None; let mut address_index__ = None; - let mut account_group_id__ = None; + let mut wallet__ = None; while let Some(k) = map.next_key()? { match k { GeneratedField::VotableAtHeight => { @@ -2169,18 +2167,18 @@ impl<'de> serde::Deserialize<'de> for NotesForVotingRequest { } address_index__ = map.next_value()?; } - GeneratedField::AccountGroupId => { - if account_group_id__.is_some() { - return Err(serde::de::Error::duplicate_field("accountGroupId")); + GeneratedField::Wallet => { + if wallet__.is_some() { + return Err(serde::de::Error::duplicate_field("wallet")); } - account_group_id__ = map.next_value()?; + wallet__ = map.next_value()?; } } } Ok(NotesForVotingRequest { votable_at_height: votable_at_height__.unwrap_or_default(), address_index: address_index__, - account_group_id: account_group_id__, + wallet: wallet__, }) } } @@ -2317,7 +2315,7 @@ impl serde::Serialize for NotesRequest { if self.amount_to_spend.is_some() { len += 1; } - if self.account_group_id.is_some() { + if self.wallet.is_some() { len += 1; } let mut struct_ser = serializer.serialize_struct("penumbra.view.v1alpha1.NotesRequest", len)?; @@ -2333,8 +2331,8 @@ impl serde::Serialize for NotesRequest { if let Some(v) = self.amount_to_spend.as_ref() { struct_ser.serialize_field("amountToSpend", v)?; } - if let Some(v) = self.account_group_id.as_ref() { - struct_ser.serialize_field("accountGroupId", v)?; + if let Some(v) = self.wallet.as_ref() { + struct_ser.serialize_field("wallet", v)?; } struct_ser.end() } @@ -2354,8 +2352,7 @@ impl<'de> serde::Deserialize<'de> for NotesRequest { "addressIndex", "amount_to_spend", "amountToSpend", - "account_group_id", - "accountGroupId", + "wallet", ]; #[allow(clippy::enum_variant_names)] @@ -2364,7 +2361,7 @@ impl<'de> serde::Deserialize<'de> for NotesRequest { AssetId, AddressIndex, AmountToSpend, - AccountGroupId, + Wallet, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -2390,7 +2387,7 @@ impl<'de> serde::Deserialize<'de> for NotesRequest { "assetId" | "asset_id" => Ok(GeneratedField::AssetId), "addressIndex" | "address_index" => Ok(GeneratedField::AddressIndex), "amountToSpend" | "amount_to_spend" => Ok(GeneratedField::AmountToSpend), - "accountGroupId" | "account_group_id" => Ok(GeneratedField::AccountGroupId), + "wallet" => Ok(GeneratedField::Wallet), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -2414,7 +2411,7 @@ impl<'de> serde::Deserialize<'de> for NotesRequest { let mut asset_id__ = None; let mut address_index__ = None; let mut amount_to_spend__ = None; - let mut account_group_id__ = None; + let mut wallet__ = None; while let Some(k) = map.next_key()? { match k { GeneratedField::IncludeSpent => { @@ -2441,11 +2438,11 @@ impl<'de> serde::Deserialize<'de> for NotesRequest { } amount_to_spend__ = map.next_value()?; } - GeneratedField::AccountGroupId => { - if account_group_id__.is_some() { - return Err(serde::de::Error::duplicate_field("accountGroupId")); + GeneratedField::Wallet => { + if wallet__.is_some() { + return Err(serde::de::Error::duplicate_field("wallet")); } - account_group_id__ = map.next_value()?; + wallet__ = map.next_value()?; } } } @@ -2454,7 +2451,7 @@ impl<'de> serde::Deserialize<'de> for NotesRequest { asset_id: asset_id__, address_index: address_index__, amount_to_spend: amount_to_spend__, - account_group_id: account_group_id__, + wallet: wallet__, }) } } @@ -2567,7 +2564,7 @@ impl serde::Serialize for NullifierStatusRequest { if self.await_detection { len += 1; } - if self.account_group_id.is_some() { + if self.wallet.is_some() { len += 1; } let mut struct_ser = serializer.serialize_struct("penumbra.view.v1alpha1.NullifierStatusRequest", len)?; @@ -2577,8 +2574,8 @@ impl serde::Serialize for NullifierStatusRequest { if self.await_detection { struct_ser.serialize_field("awaitDetection", &self.await_detection)?; } - if let Some(v) = self.account_group_id.as_ref() { - struct_ser.serialize_field("accountGroupId", v)?; + if let Some(v) = self.wallet.as_ref() { + struct_ser.serialize_field("wallet", v)?; } struct_ser.end() } @@ -2593,15 +2590,14 @@ impl<'de> serde::Deserialize<'de> for NullifierStatusRequest { "nullifier", "await_detection", "awaitDetection", - "account_group_id", - "accountGroupId", + "wallet", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { Nullifier, AwaitDetection, - AccountGroupId, + Wallet, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -2625,7 +2621,7 @@ impl<'de> serde::Deserialize<'de> for NullifierStatusRequest { match value { "nullifier" => Ok(GeneratedField::Nullifier), "awaitDetection" | "await_detection" => Ok(GeneratedField::AwaitDetection), - "accountGroupId" | "account_group_id" => Ok(GeneratedField::AccountGroupId), + "wallet" => Ok(GeneratedField::Wallet), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -2647,7 +2643,7 @@ impl<'de> serde::Deserialize<'de> for NullifierStatusRequest { { let mut nullifier__ = None; let mut await_detection__ = None; - let mut account_group_id__ = None; + let mut wallet__ = None; while let Some(k) = map.next_key()? { match k { GeneratedField::Nullifier => { @@ -2662,18 +2658,18 @@ impl<'de> serde::Deserialize<'de> for NullifierStatusRequest { } await_detection__ = Some(map.next_value()?); } - GeneratedField::AccountGroupId => { - if account_group_id__.is_some() { - return Err(serde::de::Error::duplicate_field("accountGroupId")); + GeneratedField::Wallet => { + if wallet__.is_some() { + return Err(serde::de::Error::duplicate_field("wallet")); } - account_group_id__ = map.next_value()?; + wallet__ = map.next_value()?; } } } Ok(NullifierStatusRequest { nullifier: nullifier__, await_detection: await_detection__.unwrap_or_default(), - account_group_id: account_group_id__, + wallet: wallet__, }) } } @@ -3201,12 +3197,12 @@ impl serde::Serialize for StatusRequest { { use serde::ser::SerializeStruct; let mut len = 0; - if self.account_group_id.is_some() { + if self.wallet.is_some() { len += 1; } let mut struct_ser = serializer.serialize_struct("penumbra.view.v1alpha1.StatusRequest", len)?; - if let Some(v) = self.account_group_id.as_ref() { - struct_ser.serialize_field("accountGroupId", v)?; + if let Some(v) = self.wallet.as_ref() { + struct_ser.serialize_field("wallet", v)?; } struct_ser.end() } @@ -3218,13 +3214,12 @@ impl<'de> serde::Deserialize<'de> for StatusRequest { D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "account_group_id", - "accountGroupId", + "wallet", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - AccountGroupId, + Wallet, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -3246,7 +3241,7 @@ impl<'de> serde::Deserialize<'de> for StatusRequest { E: serde::de::Error, { match value { - "accountGroupId" | "account_group_id" => Ok(GeneratedField::AccountGroupId), + "wallet" => Ok(GeneratedField::Wallet), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -3266,19 +3261,19 @@ impl<'de> serde::Deserialize<'de> for StatusRequest { where V: serde::de::MapAccess<'de>, { - let mut account_group_id__ = None; + let mut wallet__ = None; while let Some(k) = map.next_key()? { match k { - GeneratedField::AccountGroupId => { - if account_group_id__.is_some() { - return Err(serde::de::Error::duplicate_field("accountGroupId")); + GeneratedField::Wallet => { + if wallet__.is_some() { + return Err(serde::de::Error::duplicate_field("wallet")); } - account_group_id__ = map.next_value()?; + wallet__ = map.next_value()?; } } } Ok(StatusRequest { - account_group_id: account_group_id__, + wallet: wallet__, }) } } @@ -3405,12 +3400,12 @@ impl serde::Serialize for StatusStreamRequest { { use serde::ser::SerializeStruct; let mut len = 0; - if self.account_group_id.is_some() { + if self.wallet.is_some() { len += 1; } let mut struct_ser = serializer.serialize_struct("penumbra.view.v1alpha1.StatusStreamRequest", len)?; - if let Some(v) = self.account_group_id.as_ref() { - struct_ser.serialize_field("accountGroupId", v)?; + if let Some(v) = self.wallet.as_ref() { + struct_ser.serialize_field("wallet", v)?; } struct_ser.end() } @@ -3422,13 +3417,12 @@ impl<'de> serde::Deserialize<'de> for StatusStreamRequest { D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "account_group_id", - "accountGroupId", + "wallet", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - AccountGroupId, + Wallet, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -3450,7 +3444,7 @@ impl<'de> serde::Deserialize<'de> for StatusStreamRequest { E: serde::de::Error, { match value { - "accountGroupId" | "account_group_id" => Ok(GeneratedField::AccountGroupId), + "wallet" => Ok(GeneratedField::Wallet), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -3470,19 +3464,19 @@ impl<'de> serde::Deserialize<'de> for StatusStreamRequest { where V: serde::de::MapAccess<'de>, { - let mut account_group_id__ = None; + let mut wallet__ = None; while let Some(k) = map.next_key()? { match k { - GeneratedField::AccountGroupId => { - if account_group_id__.is_some() { - return Err(serde::de::Error::duplicate_field("accountGroupId")); + GeneratedField::Wallet => { + if wallet__.is_some() { + return Err(serde::de::Error::duplicate_field("wallet")); } - account_group_id__ = map.next_value()?; + wallet__ = map.next_value()?; } } } Ok(StatusStreamRequest { - account_group_id: account_group_id__, + wallet: wallet__, }) } } @@ -3617,7 +3611,7 @@ impl serde::Serialize for SwapByCommitmentRequest { if self.await_detection { len += 1; } - if self.account_group_id.is_some() { + if self.wallet.is_some() { len += 1; } let mut struct_ser = serializer.serialize_struct("penumbra.view.v1alpha1.SwapByCommitmentRequest", len)?; @@ -3627,8 +3621,8 @@ impl serde::Serialize for SwapByCommitmentRequest { if self.await_detection { struct_ser.serialize_field("awaitDetection", &self.await_detection)?; } - if let Some(v) = self.account_group_id.as_ref() { - struct_ser.serialize_field("accountGroupId", v)?; + if let Some(v) = self.wallet.as_ref() { + struct_ser.serialize_field("wallet", v)?; } struct_ser.end() } @@ -3644,15 +3638,14 @@ impl<'de> serde::Deserialize<'de> for SwapByCommitmentRequest { "swapCommitment", "await_detection", "awaitDetection", - "account_group_id", - "accountGroupId", + "wallet", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { SwapCommitment, AwaitDetection, - AccountGroupId, + Wallet, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -3676,7 +3669,7 @@ impl<'de> serde::Deserialize<'de> for SwapByCommitmentRequest { match value { "swapCommitment" | "swap_commitment" => Ok(GeneratedField::SwapCommitment), "awaitDetection" | "await_detection" => Ok(GeneratedField::AwaitDetection), - "accountGroupId" | "account_group_id" => Ok(GeneratedField::AccountGroupId), + "wallet" => Ok(GeneratedField::Wallet), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -3698,7 +3691,7 @@ impl<'de> serde::Deserialize<'de> for SwapByCommitmentRequest { { let mut swap_commitment__ = None; let mut await_detection__ = None; - let mut account_group_id__ = None; + let mut wallet__ = None; while let Some(k) = map.next_key()? { match k { GeneratedField::SwapCommitment => { @@ -3713,18 +3706,18 @@ impl<'de> serde::Deserialize<'de> for SwapByCommitmentRequest { } await_detection__ = Some(map.next_value()?); } - GeneratedField::AccountGroupId => { - if account_group_id__.is_some() { - return Err(serde::de::Error::duplicate_field("accountGroupId")); + GeneratedField::Wallet => { + if wallet__.is_some() { + return Err(serde::de::Error::duplicate_field("wallet")); } - account_group_id__ = map.next_value()?; + wallet__ = map.next_value()?; } } } Ok(SwapByCommitmentRequest { swap_commitment: swap_commitment__, await_detection: await_detection__.unwrap_or_default(), - account_group_id: account_group_id__, + wallet: wallet__, }) } } @@ -4592,7 +4585,7 @@ impl serde::Serialize for TransactionPlannerRequest { if self.source.is_some() { len += 1; } - if self.account_group_id.is_some() { + if self.wallet.is_some() { len += 1; } if !self.outputs.is_empty() { @@ -4635,8 +4628,8 @@ impl serde::Serialize for TransactionPlannerRequest { if let Some(v) = self.source.as_ref() { struct_ser.serialize_field("source", v)?; } - if let Some(v) = self.account_group_id.as_ref() { - struct_ser.serialize_field("accountGroupId", v)?; + if let Some(v) = self.wallet.as_ref() { + struct_ser.serialize_field("wallet", v)?; } if !self.outputs.is_empty() { struct_ser.serialize_field("outputs", &self.outputs)?; @@ -4680,8 +4673,7 @@ impl<'de> serde::Deserialize<'de> for TransactionPlannerRequest { "fee", "memo", "source", - "account_group_id", - "accountGroupId", + "wallet", "outputs", "swaps", "swap_claims", @@ -4704,7 +4696,7 @@ impl<'de> serde::Deserialize<'de> for TransactionPlannerRequest { Fee, Memo, Source, - AccountGroupId, + Wallet, Outputs, Swaps, SwapClaims, @@ -4739,7 +4731,7 @@ impl<'de> serde::Deserialize<'de> for TransactionPlannerRequest { "fee" => Ok(GeneratedField::Fee), "memo" => Ok(GeneratedField::Memo), "source" => Ok(GeneratedField::Source), - "accountGroupId" | "account_group_id" => Ok(GeneratedField::AccountGroupId), + "wallet" => Ok(GeneratedField::Wallet), "outputs" => Ok(GeneratedField::Outputs), "swaps" => Ok(GeneratedField::Swaps), "swapClaims" | "swap_claims" => Ok(GeneratedField::SwapClaims), @@ -4772,7 +4764,7 @@ impl<'de> serde::Deserialize<'de> for TransactionPlannerRequest { let mut fee__ = None; let mut memo__ = None; let mut source__ = None; - let mut account_group_id__ = None; + let mut wallet__ = None; let mut outputs__ = None; let mut swaps__ = None; let mut swap_claims__ = None; @@ -4810,11 +4802,11 @@ impl<'de> serde::Deserialize<'de> for TransactionPlannerRequest { } source__ = map.next_value()?; } - GeneratedField::AccountGroupId => { - if account_group_id__.is_some() { - return Err(serde::de::Error::duplicate_field("accountGroupId")); + GeneratedField::Wallet => { + if wallet__.is_some() { + return Err(serde::de::Error::duplicate_field("wallet")); } - account_group_id__ = map.next_value()?; + wallet__ = map.next_value()?; } GeneratedField::Outputs => { if outputs__.is_some() { @@ -4877,7 +4869,7 @@ impl<'de> serde::Deserialize<'de> for TransactionPlannerRequest { fee: fee__, memo: memo__, source: source__, - account_group_id: account_group_id__, + wallet: wallet__, outputs: outputs__.unwrap_or_default(), swaps: swaps__.unwrap_or_default(), swap_claims: swap_claims__.unwrap_or_default(), @@ -5864,12 +5856,12 @@ impl serde::Serialize for UnclaimedSwapsRequest { { use serde::ser::SerializeStruct; let mut len = 0; - if self.account_group_id.is_some() { + if self.wallet.is_some() { len += 1; } let mut struct_ser = serializer.serialize_struct("penumbra.view.v1alpha1.UnclaimedSwapsRequest", len)?; - if let Some(v) = self.account_group_id.as_ref() { - struct_ser.serialize_field("accountGroupId", v)?; + if let Some(v) = self.wallet.as_ref() { + struct_ser.serialize_field("wallet", v)?; } struct_ser.end() } @@ -5881,13 +5873,12 @@ impl<'de> serde::Deserialize<'de> for UnclaimedSwapsRequest { D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "account_group_id", - "accountGroupId", + "wallet", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - AccountGroupId, + Wallet, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -5909,7 +5900,7 @@ impl<'de> serde::Deserialize<'de> for UnclaimedSwapsRequest { E: serde::de::Error, { match value { - "accountGroupId" | "account_group_id" => Ok(GeneratedField::AccountGroupId), + "wallet" => Ok(GeneratedField::Wallet), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -5929,19 +5920,19 @@ impl<'de> serde::Deserialize<'de> for UnclaimedSwapsRequest { where V: serde::de::MapAccess<'de>, { - let mut account_group_id__ = None; + let mut wallet__ = None; while let Some(k) = map.next_key()? { match k { - GeneratedField::AccountGroupId => { - if account_group_id__.is_some() { - return Err(serde::de::Error::duplicate_field("accountGroupId")); + GeneratedField::Wallet => { + if wallet__.is_some() { + return Err(serde::de::Error::duplicate_field("wallet")); } - account_group_id__ = map.next_value()?; + wallet__ = map.next_value()?; } } } Ok(UnclaimedSwapsRequest { - account_group_id: account_group_id__, + wallet: wallet__, }) } } @@ -6529,7 +6520,7 @@ impl serde::Serialize for WitnessRequest { if self.transaction_plan.is_some() { len += 1; } - if self.account_group_id.is_some() { + if self.wallet.is_some() { len += 1; } let mut struct_ser = serializer.serialize_struct("penumbra.view.v1alpha1.WitnessRequest", len)?; @@ -6539,8 +6530,8 @@ impl serde::Serialize for WitnessRequest { if let Some(v) = self.transaction_plan.as_ref() { struct_ser.serialize_field("transactionPlan", v)?; } - if let Some(v) = self.account_group_id.as_ref() { - struct_ser.serialize_field("accountGroupId", v)?; + if let Some(v) = self.wallet.as_ref() { + struct_ser.serialize_field("wallet", v)?; } struct_ser.end() } @@ -6556,15 +6547,14 @@ impl<'de> serde::Deserialize<'de> for WitnessRequest { "noteCommitments", "transaction_plan", "transactionPlan", - "account_group_id", - "accountGroupId", + "wallet", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { NoteCommitments, TransactionPlan, - AccountGroupId, + Wallet, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -6588,7 +6578,7 @@ impl<'de> serde::Deserialize<'de> for WitnessRequest { match value { "noteCommitments" | "note_commitments" => Ok(GeneratedField::NoteCommitments), "transactionPlan" | "transaction_plan" => Ok(GeneratedField::TransactionPlan), - "accountGroupId" | "account_group_id" => Ok(GeneratedField::AccountGroupId), + "wallet" => Ok(GeneratedField::Wallet), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -6610,7 +6600,7 @@ impl<'de> serde::Deserialize<'de> for WitnessRequest { { let mut note_commitments__ = None; let mut transaction_plan__ = None; - let mut account_group_id__ = None; + let mut wallet__ = None; while let Some(k) = map.next_key()? { match k { GeneratedField::NoteCommitments => { @@ -6625,18 +6615,18 @@ impl<'de> serde::Deserialize<'de> for WitnessRequest { } transaction_plan__ = map.next_value()?; } - GeneratedField::AccountGroupId => { - if account_group_id__.is_some() { - return Err(serde::de::Error::duplicate_field("accountGroupId")); + GeneratedField::Wallet => { + if wallet__.is_some() { + return Err(serde::de::Error::duplicate_field("wallet")); } - account_group_id__ = map.next_value()?; + wallet__ = map.next_value()?; } } } Ok(WitnessRequest { note_commitments: note_commitments__.unwrap_or_default(), transaction_plan: transaction_plan__, - account_group_id: account_group_id__, + wallet: wallet__, }) } } diff --git a/crates/proto/src/gen/proto_descriptor.bin.no_lfs b/crates/proto/src/gen/proto_descriptor.bin.no_lfs index e52faa88c7a24d55442ea72e0a516421a14c461a..540337f03ac003add2c3c394e0546073cc2e5ce1 100644 GIT binary patch delta 3776 zcmb7{du&w46~=dFj+gZ~Hr~75^?DcE3(m5Btk=(ic^C+3n*vE1Xd0xd32|B{MGcR@ zT977yQTZ*Q1sLH06V3E|VVS4E2Fs(lh3T4Yyh1pm zOlbeG49a5ZCn)Z-M1-QUL{4#~U+bcAjqu2Qp>Ykqtb(ag zu&jdRESJMvH5Tj6>8+~9QjOAcSg29ps>{N;aArfATh5^1KAd%}xhGHnYRx@?0#I8T z%nfF0Jb)Y^Z2%|$X#+q3NCV(ad7!`nnhgL2pxFRW0Ga_TZz}I7arVKl_o3aC2Z8e1 z4Gaai-M~pu+%A06GBNXsY=J*T-Ez0SB0GE;|%}`Guw49Dw;D z_kaTWopf@2k{Z)*q|@Yq(sKcKPoaQyh9iSL%`2I=aYas|WrlzPvCLEk1!7rguB#kF$+DrOG8?l}CmK|bIfgEH~x;@4o*)3LD?4+H1TeL8? zU9CJM-iUA21cv+JTF!D@?I8`M8{iRqThEy4H-=?1B99~Lha9)C$ru?l>? z>$&M4hiraCESg&UgybYGTI1WyVoTMRPl%{#X)1d{%nn-ejP6cSUxyw(CpM@~pAcsX z6RvGWs_*?w>?`STLa?e$d}gdcwG4_H<6?IWipzD@9~mN|f?NK-a(<1A*zeTxOX4B7 zUuNweToQX&=n-@+#Gq@^7^mu3XX0`7$|X^5qSWduB2!Z$r=puVVdxNJd}?fbKFH&e8L?YGx&p+feV<0`q+aec6rdWxq#EQ`OA?aKCST+#hPPxr>G zHGa@{BGpfJ(^uIF#ri374~f*8e(GW8?T`B@G-+X_?iqUDml+?bNB7Xa$($!f?ojjg z((fmWobb)EpB$hMh+R~TZ_r!!5U;8gy@2omHF>zXcKMQ5$fznlN)_tRe(Dg9%dlF0 zl){Di%~X&5(EXN91Rs+T)q9j8s_OvFVI%6z1N8bm)Mxj7pRR|BMh2LB%U>n+kHex& z?Rkd=O0IFq{b>6YzUNr%ikrI>d`pE*unE9E?{e)Svrdotb2+hSa0LKmW)jMuB?GxT7FPd7n$*%+RY^dy*_thP>Wau{6fU5vM>!)Iu7hS!-O zZMBQlXFLgJ7i(#iUvL)6j`)EY)OQ4MK1*I~$_y^Pn!((0FI zDZapctBLHo1a9+&7clCARNul1poZlA&!*A5{gM{CxuKD6+ z8k*wNJY5_1i#wm(#C-vPnnAcVLn24NFoy|=9Q^`0_}{3-Jns_#M+F|NIl$!ud?qF-C0(UgbQXIw$){QSG({NJO6$_b2UL zW7NbrFH@(l(WA|#-84AiXGP&uhlWJ>Sz(1_8rQl(XMRuM<65QG|C*+$C$7`fjLC#a zXVzqb1o|E_85B!ACwPa-U8lwjPZ@vhcuv%|c@oSyF>AJ5;-rImU+@Rjr`Ks|6K^#^ zy6e0z+7@`yiF#nMwDs4$K|j4=!Dp%GKBadPyun222Q@4jTRaJ9ShRmmExbXgCbNXJ zb8_be*Z;Z{5G0`U!m98jpz~r{rP}uysL_E&JqQxes0Tp;8UcyLs%9zSAiP+mBJ=ZA$5`MQu=K}d92gPJB@p!4JLlZFXYQW8;@$mU@9*YM6u&Rg(nF^r>D0s(?Bn#`Cmv+~N^h*(=3Al_ z#8<6K^meC~Kax!Ju3g^Q9uVoeXMJ*ZALW&`S$hwvt$FPW^Xym~ryq!XonNWt-5ezk z@8W@@ORM%WPDSajC+&>V7;UVUMK11Qy6|ZE4iZ4RS3AQs!Y1|#DP(MYkI!b4taz5C z)-*ewsfe6n2Z3E!5=@syD>hL{mbuD=a`27yYPp)5fVfK+#h!6mo|bJvx5D`&7~#bQ z{t*n(;$Uc)j%~lEe0ZCI?)MapV72cHZW>tt-(Olb%;&lYc%sAG9Q=T%cm#tV@JB{4 z=z+=AsD+R&(nyKw^=~PN# zTic^zOSNJxNBJt{GAOG@V9Az2) z@<2)Y%bH}Aip)j9U3k`2_DKN(p~^lfKp<4<-t^8`g+m~d;2bR=5TZ5#2!tpI7e@$L zCZW!D00N=TCIEp@2SRPFzsc%@TlJyAP7eU-HP~bzkQ;0=5XcQ6Z>$|oFWV$E*#saE znrs3P2u&cIt;N~3y6G_qt@dFD0--fWH=6?lLaWb8%%k3vnN(tLsdr?i?Sn0~r&&D( z0&S*0pe@!ojnS#iHHQTs3b%!S5%213kEasJNYBwk-3;b5HOEY1fvpAvwFP$8Ku}wt zdpDn-vi1BFh95W1PZ6c_*~jwwdhrt9&gJvJ6iaVAQTUxs6l3ZJ@zX5UEO$OBmX}tT zMPfD}k9of67z_R=Jh!7~RkCwsM^8BQvySi&JGy(dm1mELiri76##cwghm-UV7y<)= z>+VlDzsg1MU3uvP@!;4|-KoDIo?+7$VNN2FbDgemiU#L|7bE4LCpx=RU60qSN_3}^ ziLS1W_V9|E$?}U2MXaI-CnMWpV^m$?zR1XePz#f*jX58Q7oOvPykT5iM}aIl;?+vz z(92XL3pUUfw>>F&cYIQ2ZKU4Z%GFx#qEtN9+q1Ca(cX@plzzJl?T$tFY@;R7F3oF6 zE=nak;%n|q_@0{^^v#>{o}^YJhYq3g0_zp1U@1VaB8^#nHtrt1!U+TmB{=(w3vpN=9lq<{PrlWn)y7<~}J2>*MQh0Y|)17<^$xD(Ju}@{obF}Nb)i-EPj4JFP3|%Zwh&T|Ory0IZ)|nhk zj6O!wWchJ=EJoFKkdo?S(K-i$)5q!?wEImCP(Pzu`KRObK;5v9`q1fT6DHdnVMf)& zv^JANI_+T88myNyPEcrcwQ}hR3WRB*%_IozV3pGy2%#OUd4}=q3G(UD>5wbLprsw0 zw*;%g^V&PQQ=O|j?J*s^7F2 zr?hBSS@<}bb?ol501sJ!Xk`J2ERH!@03wTHs^EwJNik+NvRK_1r!rf~7vCRlBskDL z<>&%J_Y`#HKi;RW%nJNUb}+N-t$hR!6@X|}00^f+#|aQlgQ|k+3v?>mv>LCh`bEa0 zaH|z~umaJt0)$n+uulgdtojA4e((uRVWw4uvf6w1R^Y)3M9T^gR(l;QKv?aCmAr6? zlBUx{bq)^*d`W!!`M$L%@ZbcZBZ-hbe5ndy~w(UK8UjG9aQ~6O|F;tNIteVTV1t2(Y!@}mE>XU+6SWZQDg74m@`*1)Yn_J zdX>)zYLdUXO0S2h#*R{N<{432??8~wi0O@T-8G8TigI%~YCgr^4D|3?!x3Ty6T)7-6Yw5h7^Pf*JYeDiav*WH_m z;U2_aR6+HK+)QJ}V~eO>9r-OJT1*}gju)WyWB?Jnh3qE-2-Pjr)V$KYHkn8z>i-Yj CaiI+W diff --git a/crates/view/src/client.rs b/crates/view/src/client.rs index f8db72892a..7d5d91cd2e 100644 --- a/crates/view/src/client.rs +++ b/crates/view/src/client.rs @@ -46,13 +46,13 @@ pub trait ViewClient { /// Get the current status of chain sync. fn status( &mut self, - account_group_id: Wallet, + wallet: Wallet, ) -> Pin> + Send + 'static>>; /// Stream status updates on chain sync until it completes. fn status_stream( &mut self, - account_group_id: Wallet, + wallet: Wallet, ) -> Pin< Box< dyn Future< @@ -98,21 +98,21 @@ pub trait ViewClient { /// Queries for a specific note by commitment, returning immediately if it is not found. fn note_by_commitment( &mut self, - account_group_id: Wallet, + wallet: Wallet, note_commitment: note::StateCommitment, ) -> Pin> + Send + 'static>>; /// Queries for a specific swap by commitment, returning immediately if it is not found. fn swap_by_commitment( &mut self, - account_group_id: Wallet, + wallet: Wallet, swap_commitment: penumbra_tct::StateCommitment, ) -> Pin> + Send + 'static>>; /// Queries for a specific nullifier's status, returning immediately if it is not found. fn nullifier_status( &mut self, - account_group_id: Wallet, + wallet: Wallet, nullifier: Nullifier, ) -> Pin> + Send + 'static>>; @@ -120,7 +120,7 @@ pub trait ViewClient { /// present, but waiting otherwise. fn await_nullifier( &mut self, - account_group_id: Wallet, + wallet: Wallet, nullifier: Nullifier, ) -> Pin> + Send + 'static>>; @@ -129,7 +129,7 @@ pub trait ViewClient { /// This is useful for waiting for a note to be detected by the view service. fn await_note_by_commitment( &mut self, - account_group_id: Wallet, + wallet: Wallet, note_commitment: note::StateCommitment, ) -> Pin> + Send + 'static>>; @@ -141,7 +141,7 @@ pub trait ViewClient { /// service could have advanced the state commitment tree state between queries). fn witness( &mut self, - account_group_id: Wallet, + wallet: Wallet, plan: &TransactionPlan, ) -> Pin> + Send + 'static>>; @@ -182,10 +182,10 @@ pub trait ViewClient { ) -> Pin> + Send + 'static>>; /// Return unspent notes, grouped by address index and then by asset id. - #[instrument(skip(self, account_group_id))] + #[instrument(skip(self, wallet))] fn unspent_notes_by_address_and_asset( &mut self, - account_group_id: Wallet, + wallet: Wallet, ) -> Pin< Box< dyn Future< @@ -197,7 +197,7 @@ pub trait ViewClient { >, > { let notes = self.notes(pb::NotesRequest { - account_group_id: Some(account_group_id.into()), + wallet: Some(wallet.into()), include_spent: false, ..Default::default() }); @@ -223,10 +223,10 @@ pub trait ViewClient { } /// Return unspent notes, grouped by denom and then by address index. - #[instrument(skip(self, account_group_id))] + #[instrument(skip(self, wallet))] fn unspent_notes_by_asset_and_address( &mut self, - account_group_id: Wallet, + wallet: Wallet, ) -> Pin< Box< dyn Future< @@ -238,7 +238,7 @@ pub trait ViewClient { >, > { let notes = self.notes(pb::NotesRequest { - account_group_id: Some(account_group_id.into()), + wallet: Some(wallet.into()), include_spent: false, ..Default::default() }); @@ -291,12 +291,12 @@ where { fn status( &mut self, - account_group_id: Wallet, + wallet: Wallet, ) -> Pin> + Send + 'static>> { let mut self2 = self.clone(); async move { let status = self2.status(tonic::Request::new(pb::StatusRequest { - account_group_id: Some(account_group_id.into()), + wallet: Some(wallet.into()), })); let status = status.await?.into_inner(); Ok(status) @@ -306,7 +306,7 @@ where fn status_stream( &mut self, - account_group_id: Wallet, + wallet: Wallet, ) -> Pin< Box< dyn Future< @@ -320,7 +320,7 @@ where let mut self2 = self.clone(); async move { let stream = self2.status_stream(tonic::Request::new(pb::StatusStreamRequest { - account_group_id: Some(account_group_id.into()), + wallet: Some(wallet.into()), })); let stream = stream.await?.into_inner(); @@ -425,7 +425,7 @@ where fn note_by_commitment( &mut self, - account_group_id: Wallet, + wallet: Wallet, note_commitment: note::StateCommitment, ) -> Pin> + Send + 'static>> { let mut self2 = self.clone(); @@ -433,7 +433,7 @@ where let note_commitment_response = ViewProtocolServiceClient::note_by_commitment( &mut self2, tonic::Request::new(pb::NoteByCommitmentRequest { - account_group_id: Some(account_group_id.into()), + wallet: Some(wallet.into()), note_commitment: Some(note_commitment.into()), await_detection: false, }), @@ -491,7 +491,7 @@ where fn swap_by_commitment( &mut self, - account_group_id: Wallet, + wallet: Wallet, swap_commitment: penumbra_tct::StateCommitment, ) -> Pin> + Send + 'static>> { let mut self2 = self.clone(); @@ -499,7 +499,7 @@ where let swap_commitment_response = ViewProtocolServiceClient::swap_by_commitment( &mut self2, tonic::Request::new(pb::SwapByCommitmentRequest { - account_group_id: Some(account_group_id.into()), + wallet: Some(wallet.into()), swap_commitment: Some(swap_commitment.into()), await_detection: false, }), @@ -519,7 +519,7 @@ where /// This is useful for waiting for a note to be detected by the view service. fn await_note_by_commitment( &mut self, - account_group_id: Wallet, + wallet: Wallet, note_commitment: note::StateCommitment, ) -> Pin> + Send + 'static>> { let mut self2 = self.clone(); @@ -527,7 +527,7 @@ where let spendable_note = ViewProtocolServiceClient::note_by_commitment( &mut self2, tonic::Request::new(pb::NoteByCommitmentRequest { - account_group_id: Some(account_group_id.into()), + wallet: Some(wallet.into()), note_commitment: Some(note_commitment.into()), await_detection: true, }), @@ -544,7 +544,7 @@ where /// Queries for a specific nullifier's status, returning immediately if it is not found. fn nullifier_status( &mut self, - account_group_id: Wallet, + wallet: Wallet, nullifier: Nullifier, ) -> Pin> + Send + 'static>> { let mut self2 = self.clone(); @@ -552,7 +552,7 @@ where let rsp = ViewProtocolServiceClient::nullifier_status( &mut self2, tonic::Request::new(pb::NullifierStatusRequest { - account_group_id: Some(account_group_id.into()), + wallet: Some(wallet.into()), nullifier: Some(nullifier.into()), await_detection: false, }), @@ -566,7 +566,7 @@ where /// present, but waiting otherwise. fn await_nullifier( &mut self, - account_group_id: Wallet, + wallet: Wallet, nullifier: Nullifier, ) -> Pin> + Send + 'static>> { let mut self2 = self.clone(); @@ -574,7 +574,7 @@ where let rsp = ViewProtocolServiceClient::nullifier_status( &mut self2, tonic::Request::new(pb::NullifierStatusRequest { - account_group_id: Some(account_group_id.into()), + wallet: Some(wallet.into()), nullifier: Some(nullifier.into()), await_detection: true, }), @@ -587,7 +587,7 @@ where fn witness( &mut self, - account_group_id: Wallet, + wallet: Wallet, plan: &TransactionPlan, ) -> Pin> + Send + 'static>> { // TODO: delete this code and move it into the view service. @@ -610,7 +610,7 @@ where .collect(); let request = WitnessRequest { - account_group_id: Some(account_group_id.into()), + wallet: Some(wallet.into()), note_commitments, transaction_plan: Some(plan.clone().into()), }; diff --git a/crates/view/src/planner.rs b/crates/view/src/planner.rs index 841359f658..4c34a76980 100644 --- a/crates/view/src/planner.rs +++ b/crates/view/src/planner.rs @@ -92,14 +92,14 @@ impl Planner { /// Get all the note requests necessary to fulfill the current [`Balance`]. pub fn notes_requests( &self, - account_group_id: Wallet, + wallet: Wallet, source: AddressIndex, ) -> (Vec, Vec) { ( self.balance .required() .map(|Value { asset_id, amount }| NotesRequest { - account_group_id: Some(account_group_id.into()), + wallet: Some(wallet.into()), asset_id: Some(asset_id.into()), address_index: Some(source.into()), amount_to_spend: Some(amount.into()), @@ -115,7 +115,7 @@ impl Planner { start_block_height, .. }, )| NotesForVotingRequest { - account_group_id: Some(account_group_id.into()), + wallet: Some(wallet.into()), votable_at_height: *start_block_height, address_index: Some(source.into()), }, @@ -425,7 +425,7 @@ impl Planner { pub async fn plan( &mut self, view: &mut V, - account_group_id: Wallet, + wallet: Wallet, source: AddressIndex, ) -> anyhow::Result { // Gather all the information needed from the view service @@ -433,7 +433,7 @@ impl Planner { let fmd_params = view.fmd_parameters().await?; let mut spendable_notes = Vec::new(); let mut voting_notes = Vec::new(); - let (spendable_requests, voting_requests) = self.notes_requests(account_group_id, source); + let (spendable_requests, voting_requests) = self.notes_requests(wallet, source); for request in spendable_requests { let notes = view.notes(request).await?; spendable_notes.extend(notes); diff --git a/crates/view/src/service.rs b/crates/view/src/service.rs index 4d2c3cd3e9..b76145181b 100644 --- a/crates/view/src/service.rs +++ b/crates/view/src/service.rs @@ -70,7 +70,7 @@ pub struct ViewService { // A shared error slot for errors bubbled up by the worker. This is a regular Mutex // rather than a Tokio Mutex because it should be uncontended. error_slot: Arc>>, - account_group_id: Wallet, + wallet: Wallet, // A copy of the SCT used by the worker task. state_commitment_tree: Arc>, // The Url for the pd gRPC endpoint on remote node. @@ -105,11 +105,11 @@ impl ViewService { tokio::spawn(worker.run()); let fvk = storage.full_viewing_key().await?; - let account_group_id = fvk.account_group_id(); + let wallet = fvk.wallet(); Ok(Self { storage, - account_group_id, + wallet, error_slot, sync_height_rx, state_commitment_tree: sct, @@ -118,12 +118,9 @@ impl ViewService { } /// Checks that the account group ID, if present, matches the one for this service. - async fn check_account_group_id( - &self, - fvk: Option<&pbc::AccountGroupId>, - ) -> Result<(), tonic::Status> { + async fn check_wallet(&self, fvk: Option<&pbc::Wallet>) -> Result<(), tonic::Status> { if let Some(fvk) = fvk { - if fvk != &self.account_group_id.into() { + if fvk != &self.wallet.into() { return Err(tonic::Status::new( tonic::Code::InvalidArgument, "Invalid account ID", @@ -598,7 +595,7 @@ impl ViewProtocolService for ViewService { .unwrap_or(0u32); let plan = planner - .plan(&mut client_of_self, fvk.account_group_id(), source.into()) + .plan(&mut client_of_self, fvk.wallet(), source.into()) .await .context("could not plan requested transaction") .map_err(|e| tonic::Status::invalid_argument(format!("{e:#}")))?; @@ -863,8 +860,7 @@ impl ViewProtocolService for ViewService { request: tonic::Request, ) -> Result, tonic::Status> { self.check_worker().await?; - self.check_account_group_id(request.get_ref().account_group_id.as_ref()) - .await?; + self.check_wallet(request.get_ref().wallet.as_ref()).await?; let request = request.into_inner(); @@ -948,8 +944,7 @@ impl ViewProtocolService for ViewService { request: tonic::Request, ) -> Result, tonic::Status> { self.check_worker().await?; - self.check_account_group_id(request.get_ref().account_group_id.as_ref()) - .await?; + self.check_wallet(request.get_ref().wallet.as_ref()).await?; let request = request.into_inner(); @@ -980,8 +975,7 @@ impl ViewProtocolService for ViewService { request: tonic::Request, ) -> Result, tonic::Status> { self.check_worker().await?; - self.check_account_group_id(request.get_ref().account_group_id.as_ref()) - .await?; + self.check_wallet(request.get_ref().wallet.as_ref()).await?; let request = request.into_inner(); @@ -1005,8 +999,7 @@ impl ViewProtocolService for ViewService { request: tonic::Request, ) -> Result, tonic::Status> { self.check_worker().await?; - self.check_account_group_id(request.get_ref().account_group_id.as_ref()) - .await?; + self.check_wallet(request.get_ref().wallet.as_ref()).await?; Ok(tonic::Response::new(self.status().await.map_err(|e| { tonic::Status::internal(format!("error: {e}")) @@ -1018,8 +1011,7 @@ impl ViewProtocolService for ViewService { request: tonic::Request, ) -> Result, tonic::Status> { self.check_worker().await?; - self.check_account_group_id(request.get_ref().account_group_id.as_ref()) - .await?; + self.check_wallet(request.get_ref().wallet.as_ref()).await?; let (latest_known_block_height, _) = self.latest_known_block_height().await.map_err(|e| { @@ -1051,8 +1043,7 @@ impl ViewProtocolService for ViewService { request: tonic::Request, ) -> Result, tonic::Status> { self.check_worker().await?; - self.check_account_group_id(request.get_ref().account_group_id.as_ref()) - .await?; + self.check_wallet(request.get_ref().wallet.as_ref()).await?; let request = request.into_inner(); @@ -1104,8 +1095,7 @@ impl ViewProtocolService for ViewService { request: tonic::Request, ) -> Result, tonic::Status> { self.check_worker().await?; - self.check_account_group_id(request.get_ref().account_group_id.as_ref()) - .await?; + self.check_wallet(request.get_ref().wallet.as_ref()).await?; let address_index = request .get_ref() @@ -1261,8 +1251,7 @@ impl ViewProtocolService for ViewService { request: tonic::Request, ) -> Result, tonic::Status> { self.check_worker().await?; - self.check_account_group_id(request.get_ref().account_group_id.as_ref()) - .await?; + self.check_wallet(request.get_ref().wallet.as_ref()).await?; // Acquire a read lock for the SCT that will live for the entire request, // so that all auth paths are relative to the same SCT root. @@ -1375,7 +1364,7 @@ impl ViewProtocolService for ViewService { .map_err(|e| tonic::Status::invalid_argument(format!("{:#}", e)))?; let witness_request = pb::WitnessRequest { - account_group_id: Some(self.account_group_id.into()), + wallet: Some(self.wallet.into()), note_commitments, transaction_plan: Some(transaction_plan.clone().into()), }; @@ -1503,8 +1492,7 @@ impl ViewProtocolService for ViewService { request: tonic::Request, ) -> Result, tonic::Status> { self.check_worker().await?; - self.check_account_group_id(request.get_ref().account_group_id.as_ref()) - .await?; + self.check_wallet(request.get_ref().wallet.as_ref()).await?; let swaps = self.storage.unclaimed_swaps().await.map_err(|e| { tonic::Status::unavailable(format!("error fetching unclaimed swaps: {e}")) diff --git a/crates/wallet/src/build.rs b/crates/wallet/src/build.rs index be2efb897a..1f46f93be0 100644 --- a/crates/wallet/src/build.rs +++ b/crates/wallet/src/build.rs @@ -20,7 +20,7 @@ where // Get the authorization data from the custody service... let auth_data: AuthorizationData = custody .authorize(AuthorizeRequest { - account_group_id: Some(fvk.account_group_id()), + wallet: Some(fvk.wallet()), plan: plan.clone(), pre_authorizations: Vec::new(), }) @@ -30,7 +30,7 @@ where .try_into()?; // Send a witness request to the view service to get witness data - let witness_data = view.witness(fvk.account_group_id(), &plan).await?; + let witness_data = view.witness(fvk.wallet(), &plan).await?; // ... and then build the transaction: #[cfg(not(feature = "parallel"))] diff --git a/crates/wallet/src/plan.rs b/crates/wallet/src/plan.rs index 99f3adcb6a..de1aa6f607 100644 --- a/crates/wallet/src/plan.rs +++ b/crates/wallet/src/plan.rs @@ -23,7 +23,7 @@ use tracing::instrument; pub use penumbra_view::Planner; pub async fn validator_definition( - account_group_id: Wallet, + wallet: Wallet, view: &mut V, rng: R, new_validator: validator::Definition, @@ -37,13 +37,13 @@ where Planner::new(rng) .fee(fee) .validator_definition(new_validator) - .plan(view, account_group_id, source_address) + .plan(view, wallet, source_address) .await .context("can't build validator definition plan") } pub async fn validator_vote( - account_group_id: Wallet, + wallet: Wallet, view: &mut V, rng: R, vote: ValidatorVote, @@ -57,23 +57,15 @@ where Planner::new(rng) .fee(fee) .validator_vote(vote) - .plan(view, account_group_id, source_address) + .plan(view, wallet, source_address) .await .context("can't build validator vote plan") } /// Generate a new transaction plan delegating stake -#[instrument(skip( - account_group_id, - view, - rng, - rate_data, - unbonded_amount, - fee, - source_address -))] +#[instrument(skip(wallet, view, rng, rate_data, unbonded_amount, fee, source_address))] pub async fn delegate( - account_group_id: Wallet, + wallet: Wallet, view: &mut V, rng: R, rate_data: RateData, @@ -88,24 +80,15 @@ where Planner::new(rng) .fee(fee) .delegate(unbonded_amount, rate_data) - .plan(view, account_group_id, source_address) + .plan(view, wallet, source_address) .await .context("can't build delegate plan") } #[allow(clippy::too_many_arguments)] -#[instrument(skip( - account_group_id, - view, - rng, - values, - fee, - dest_address, - source_address, - tx_memo -))] +#[instrument(skip(wallet, view, rng, values, fee, dest_address, source_address, tx_memo))] pub async fn send( - account_group_id: Wallet, + wallet: Wallet, view: &mut V, rng: R, values: &[Value], @@ -126,14 +109,14 @@ where } planner .memo(tx_memo.unwrap_or_default())? - .plan(view, account_group_id, source_address) + .plan(view, wallet, source_address) .await .context("can't build send transaction") } -#[instrument(skip(account_group_id, view, rng))] +#[instrument(skip(wallet, view, rng))] pub async fn sweep( - account_group_id: Wallet, + wallet: Wallet, view: &mut V, mut rng: R, ) -> anyhow::Result> @@ -148,7 +131,7 @@ where // Finally, sweep dust notes by spending them to their owner's address. // This will consolidate small-value notes into larger ones. - plans.extend(sweep_notes(account_group_id, view, &mut rng).await?); + plans.extend(sweep_notes(wallet, view, &mut rng).await?); Ok(plans) } @@ -202,9 +185,9 @@ where Ok(plans) } -#[instrument(skip(account_group_id, view, rng))] +#[instrument(skip(wallet, view, rng))] pub async fn sweep_notes( - account_group_id: Wallet, + wallet: Wallet, view: &mut V, mut rng: R, ) -> anyhow::Result> @@ -216,7 +199,7 @@ where let all_notes = view .notes(NotesRequest { - account_group_id: Some(account_group_id.into()), + wallet: Some(wallet.into()), ..Default::default() }) .await?; @@ -254,7 +237,7 @@ where } let plan = planner - .plan(view, account_group_id, index) + .plan(view, wallet, index) .await .context("can't build sweep transaction")?; @@ -267,9 +250,9 @@ where Ok(plans) } -#[instrument(skip(account_group_id, view, rng))] +#[instrument(skip(wallet, view, rng))] pub async fn proposal_submit( - account_group_id: Wallet, + wallet: Wallet, view: &mut V, rng: R, proposal: Proposal, @@ -289,15 +272,15 @@ where .governance_params .proposal_deposit_amount, ) - .plan(view, account_group_id, source_address) + .plan(view, wallet, source_address) .await .context("can't build proposal submit transaction") } #[allow(clippy::too_many_arguments)] -#[instrument(skip(account_group_id, view, rng))] +#[instrument(skip(wallet, view, rng))] pub async fn proposal_withdraw( - account_group_id: Wallet, + wallet: Wallet, view: &mut V, rng: R, proposal_id: u64, @@ -312,15 +295,15 @@ where Planner::new(rng) .fee(fee) .proposal_withdraw(proposal_id, reason) - .plan(view, account_group_id, source_address) + .plan(view, wallet, source_address) .await .context("can't build proposal withdraw transaction") } #[allow(clippy::too_many_arguments)] -#[instrument(skip(account_group_id, view, rng))] +#[instrument(skip(wallet, view, rng))] pub async fn proposal_deposit_claim( - account_group_id: Wallet, + wallet: Wallet, view: &mut V, rng: R, proposal_id: u64, @@ -336,7 +319,7 @@ where Planner::new(rng) .fee(fee) .proposal_deposit_claim(proposal_id, deposit_amount, outcome) - .plan(view, account_group_id, source_address) + .plan(view, wallet, source_address) .await .context("can't build proposal withdraw transaction") } diff --git a/crates/wasm/src/keys.rs b/crates/wasm/src/keys.rs index 253593c6c7..95ef0746f5 100644 --- a/crates/wasm/src/keys.rs +++ b/crates/wasm/src/keys.rs @@ -56,7 +56,7 @@ pub fn get_full_viewing_key(spend_key: &str) -> WasmResult { #[wasm_bindgen] pub fn get_wallet_id(full_viewing_key: &str) -> WasmResult { let fvk = FullViewingKey::from_str(full_viewing_key)?; - Ok(fvk.account_group_id().to_string()) + Ok(fvk.wallet().to_string()) } /// get address by index using FVK diff --git a/crates/wasm/src/planner.rs b/crates/wasm/src/planner.rs index 7ac80c71f3..71969f7450 100644 --- a/crates/wasm/src/planner.rs +++ b/crates/wasm/src/planner.rs @@ -87,7 +87,7 @@ impl Planner { self.balance .required() .map(|Value { asset_id, amount }| NotesRequest { - account_group_id: None, + wallet: None, asset_id: Some(asset_id.into()), address_index: None, amount_to_spend: Some(amount.into()), @@ -103,7 +103,7 @@ impl Planner { start_block_height, .. }, )| NotesForVotingRequest { - account_group_id: None, + wallet: None, votable_at_height: *start_block_height, address_index: None, }, diff --git a/crates/wasm/tests/test_keys.rs b/crates/wasm/tests/test_keys.rs index 2cbb5ef50b..be48e0200c 100644 --- a/crates/wasm/tests/test_keys.rs +++ b/crates/wasm/tests/test_keys.rs @@ -7,8 +7,7 @@ fn successfully_get_wallet_id() { let fvk_str = "penumbrafullviewingkey1sjeaceqzgaeye2ksnz8q73mp6rpx2ykdtzs8wurrnhwdn8vqwuxhxtjdndrjc74udjh0uch0tatnrd93q50wp9pfk86h3lgpew8lsqsz2a6la".to_string(); let actual_bech32_str = get_wallet_id(&fvk_str).unwrap(); let expected_bech32_str = - "penumbraaccountgroupid15r7q7qsf3hhsgj0g530n7ng9acdacmmx9ajknjz38dyt90u9gcgs767wla" - .to_string(); + "penumbrawallet15r7q7qsf3hhsgj0g530n7ng9acdacmmx9ajknjz38dyt90u9gcgsauy5df".to_string(); assert_eq!(expected_bech32_str, actual_bech32_str); } diff --git a/docs/protocol/src/protocol/addresses_keys/viewing_keys.md b/docs/protocol/src/protocol/addresses_keys/viewing_keys.md index f22c66511a..1a7ae849ef 100644 --- a/docs/protocol/src/protocol/addresses_keys/viewing_keys.md +++ b/docs/protocol/src/protocol/addresses_keys/viewing_keys.md @@ -38,7 +38,7 @@ to as an *Account ID* and is derived as follows. Define `poseidon_hash_2(label, x1, x2)` to be rate-2 Poseidon hashing of inputs `x1`, -`x2` with the capacity initialized to the domain separator `label`. Define +`x2` with the capacity initialized to the domain separator `label`. Define `from_le_bytes(bytes)` as the function that interprets its input bytes as an integer in little-endian order. Define `element.to_le_bytes()` as the function that encodes an input element in @@ -48,7 +48,7 @@ Then ``` hash_output = poseidon_hash_2(from_le_bytes(b"Penumbra_HashFVK"), nk, decaf377_s(ak)) -account_group_id = hash_output.to_le_bytes()[0:32] +wallet = hash_output.to_le_bytes()[0:32] ``` i.e. we take the 32-bytes of the hash output as the account ID. @@ -62,7 +62,7 @@ The incoming viewing key consists of two components: The diversifier key is used to derive *diversifiers*, which allow a single spend authority to have multiple, publicly unlinkable *diversified addresses*, as -described in the next section. The incoming viewing key is used to scan the +described in the next section. The incoming viewing key is used to scan the chain for transactions sent to every diversified address simultaneously. The outgoing viewing key consists of one component: @@ -72,10 +72,10 @@ The outgoing viewing key consists of one component: These components are derived as follows. The $\mathsf {dk}$ and $\mathsf {ovk}$ are not intended to be derived in a -circuit. Define `prf_expand(label, key, input)` as BLAKE2b-512 with -personalization `label`, key `key`, and input `input`. Define +circuit. Define `prf_expand(label, key, input)` as BLAKE2b-512 with +personalization `label`, key `key`, and input `input`. Define `to_le_bytes(input)` as the function that encodes an input integer in -little-endian byte order. Define `decaf377_encode(element)` as the function +little-endian byte order. Define `decaf377_encode(element)` as the function that produces the canonical encoding of a `decaf377` element. Then ``` @@ -83,10 +83,12 @@ ovk = prf_expand(b"Penumbra_DeriOVK", to_le_bytes(nk), decaf377_encode(ak))[0.. dk = prf_expand(b"Penumbra_DerivDK", to_le_bytes(nk), decaf377_encode(ak))[0..16] ``` -The $\mathsf {ivk}$ is intended to be derived in a circuit. Then +The $\mathsf {ivk}$ is intended to be derived in a circuit. Then + ``` ivk = poseidon_hash_2(from_le_bytes(b"penumbra.derive.ivk"), nk, decaf377_s(ak)) mod r ``` + i.e., we treat the Poseidon output (an $\mathbb F_q$ element) as an integer, and reduce it modulo $r$ to get an element of $\mathbb F_r$. diff --git a/proto/go/gen/penumbra/core/keys/v1alpha1/keys.pb.go b/proto/go/gen/penumbra/core/keys/v1alpha1/keys.pb.go index 5dddd7c0d5..7a28739584 100644 --- a/proto/go/gen/penumbra/core/keys/v1alpha1/keys.pb.go +++ b/proto/go/gen/penumbra/core/keys/v1alpha1/keys.pb.go @@ -355,7 +355,7 @@ func (x *FullViewingKey) GetInner() []byte { return nil } -type AccountGroupId struct { +type Wallet struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -363,8 +363,8 @@ type AccountGroupId struct { Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"` } -func (x *AccountGroupId) Reset() { - *x = AccountGroupId{} +func (x *Wallet) Reset() { + *x = Wallet{} if protoimpl.UnsafeEnabled { mi := &file_penumbra_core_keys_v1alpha1_keys_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -372,13 +372,13 @@ func (x *AccountGroupId) Reset() { } } -func (x *AccountGroupId) String() string { +func (x *Wallet) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AccountGroupId) ProtoMessage() {} +func (*Wallet) ProtoMessage() {} -func (x *AccountGroupId) ProtoReflect() protoreflect.Message { +func (x *Wallet) ProtoReflect() protoreflect.Message { mi := &file_penumbra_core_keys_v1alpha1_keys_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -390,12 +390,12 @@ func (x *AccountGroupId) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AccountGroupId.ProtoReflect.Descriptor instead. -func (*AccountGroupId) Descriptor() ([]byte, []int) { +// Deprecated: Use Wallet.ProtoReflect.Descriptor instead. +func (*Wallet) Descriptor() ([]byte, []int) { return file_penumbra_core_keys_v1alpha1_keys_proto_rawDescGZIP(), []int{6} } -func (x *AccountGroupId) GetInner() []byte { +func (x *Wallet) GetInner() []byte { if x != nil { return x.Inner } @@ -654,7 +654,7 @@ type AddressView_Visible struct { Address *Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` Index *AddressIndex `protobuf:"bytes,2,opt,name=index,proto3" json:"index,omitempty"` - AccountGroupId *AccountGroupId `protobuf:"bytes,3,opt,name=account_group_id,json=accountGroupId,proto3" json:"account_group_id,omitempty"` + Wallet *Wallet `protobuf:"bytes,3,opt,name=wallet,json=wallet,proto3" json:"wallet,omitempty"` } func (x *AddressView_Visible) Reset() { @@ -703,9 +703,9 @@ func (x *AddressView_Visible) GetIndex() *AddressIndex { return nil } -func (x *AddressView_Visible) GetAccountGroupId() *AccountGroupId { +func (x *AddressView_Visible) GetWallet() *Wallet { if x != nil { - return x.AccountGroupId + return x.Wallet } return nil } @@ -865,7 +865,7 @@ var file_penumbra_core_keys_v1alpha1_keys_proto_goTypes = []interface{}{ (*SpendKey)(nil), // 3: penumbra.core.keys.v1alpha1.SpendKey (*SpendVerificationKey)(nil), // 4: penumbra.core.keys.v1alpha1.SpendVerificationKey (*FullViewingKey)(nil), // 5: penumbra.core.keys.v1alpha1.FullViewingKey - (*AccountGroupId)(nil), // 6: penumbra.core.keys.v1alpha1.AccountGroupId + (*Wallet)(nil), // 6: penumbra.core.keys.v1alpha1.Wallet (*Diversifier)(nil), // 7: penumbra.core.keys.v1alpha1.Diversifier (*AddressIndex)(nil), // 8: penumbra.core.keys.v1alpha1.AddressIndex (*IdentityKey)(nil), // 9: penumbra.core.keys.v1alpha1.IdentityKey @@ -879,7 +879,7 @@ var file_penumbra_core_keys_v1alpha1_keys_proto_depIdxs = []int32{ 13, // 1: penumbra.core.keys.v1alpha1.AddressView.opaque:type_name -> penumbra.core.keys.v1alpha1.AddressView.Opaque 0, // 2: penumbra.core.keys.v1alpha1.AddressView.Visible.address:type_name -> penumbra.core.keys.v1alpha1.Address 8, // 3: penumbra.core.keys.v1alpha1.AddressView.Visible.index:type_name -> penumbra.core.keys.v1alpha1.AddressIndex - 6, // 4: penumbra.core.keys.v1alpha1.AddressView.Visible.account_group_id:type_name -> penumbra.core.keys.v1alpha1.AccountGroupId + 6, // 4: penumbra.core.keys.v1alpha1.AddressView.Visible.wallet:type_name -> penumbra.core.keys.v1alpha1.Wallet 0, // 5: penumbra.core.keys.v1alpha1.AddressView.Opaque.address:type_name -> penumbra.core.keys.v1alpha1.Address 6, // [6:6] is the sub-list for method output_type 6, // [6:6] is the sub-list for method input_type @@ -967,7 +967,7 @@ func file_penumbra_core_keys_v1alpha1_keys_proto_init() { } } file_penumbra_core_keys_v1alpha1_keys_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AccountGroupId); i { + switch v := v.(*Wallet); i { case 0: return &v.state case 1: diff --git a/proto/go/gen/penumbra/custody/v1alpha1/custody.pb.go b/proto/go/gen/penumbra/custody/v1alpha1/custody.pb.go index b2c60d821f..4b3a8f7398 100644 --- a/proto/go/gen/penumbra/custody/v1alpha1/custody.pb.go +++ b/proto/go/gen/penumbra/custody/v1alpha1/custody.pb.go @@ -30,7 +30,7 @@ type AuthorizeRequest struct { // The transaction plan to authorize. Plan *v1alpha1.TransactionPlan `protobuf:"bytes,1,opt,name=plan,proto3" json:"plan,omitempty"` // Identifies the FVK (and hence the spend authorization key) to use for signing. - AccountGroupId *v1alpha11.AccountGroupId `protobuf:"bytes,2,opt,name=account_group_id,json=accountGroupId,proto3" json:"account_group_id,omitempty"` + Wallet *v1alpha11.Wallet `protobuf:"bytes,2,opt,name=wallet,json=wallet,proto3" json:"wallet,omitempty"` // Optionally, pre-authorization data, if required by the custodian. // // Multiple `PreAuthorization` packets can be included in a single request, @@ -77,9 +77,9 @@ func (x *AuthorizeRequest) GetPlan() *v1alpha1.TransactionPlan { return nil } -func (x *AuthorizeRequest) GetAccountGroupId() *v1alpha11.AccountGroupId { +func (x *AuthorizeRequest) GetWallet() *v1alpha11.Wallet { if x != nil { - return x.AccountGroupId + return x.Wallet } return nil } @@ -362,12 +362,12 @@ var file_penumbra_custody_v1alpha1_custody_proto_goTypes = []interface{}{ (*PreAuthorization)(nil), // 2: penumbra.custody.v1alpha1.PreAuthorization (*PreAuthorization_Ed25519)(nil), // 3: penumbra.custody.v1alpha1.PreAuthorization.Ed25519 (*v1alpha1.TransactionPlan)(nil), // 4: penumbra.core.transaction.v1alpha1.TransactionPlan - (*v1alpha11.AccountGroupId)(nil), // 5: penumbra.core.keys.v1alpha1.AccountGroupId + (*v1alpha11.Wallet)(nil), // 5: penumbra.core.keys.v1alpha1.Wallet (*v1alpha1.AuthorizationData)(nil), // 6: penumbra.core.transaction.v1alpha1.AuthorizationData } var file_penumbra_custody_v1alpha1_custody_proto_depIdxs = []int32{ 4, // 0: penumbra.custody.v1alpha1.AuthorizeRequest.plan:type_name -> penumbra.core.transaction.v1alpha1.TransactionPlan - 5, // 1: penumbra.custody.v1alpha1.AuthorizeRequest.account_group_id:type_name -> penumbra.core.keys.v1alpha1.AccountGroupId + 5, // 1: penumbra.custody.v1alpha1.AuthorizeRequest.wallet:type_name -> penumbra.core.keys.v1alpha1.Wallet 2, // 2: penumbra.custody.v1alpha1.AuthorizeRequest.pre_authorizations:type_name -> penumbra.custody.v1alpha1.PreAuthorization 6, // 3: penumbra.custody.v1alpha1.AuthorizeResponse.data:type_name -> penumbra.core.transaction.v1alpha1.AuthorizationData 3, // 4: penumbra.custody.v1alpha1.PreAuthorization.ed25519:type_name -> penumbra.custody.v1alpha1.PreAuthorization.Ed25519 diff --git a/proto/go/gen/penumbra/narsil/ledger/v1alpha1/ledger.pb.go b/proto/go/gen/penumbra/narsil/ledger/v1alpha1/ledger.pb.go index 639247ec7c..a28209b24a 100644 --- a/proto/go/gen/penumbra/narsil/ledger/v1alpha1/ledger.pb.go +++ b/proto/go/gen/penumbra/narsil/ledger/v1alpha1/ledger.pb.go @@ -632,8 +632,8 @@ func (x *GenesisData) GetThreshold() uint32 { return 0 } -// Describes the Penumbra account group jointly controlled by the Narsil instance. -type AccountGroupInfo struct { +// Describes the Penumbra wallet jointly controlled by the Narsil instance. +type WalletInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -641,17 +641,17 @@ type AccountGroupInfo struct { // The full viewing key for the shared account. // // In the Penumbra key hierarchy, this is the highest-authority key below - // spend authority, and allows deriving all subkeys for all accounts in the - // account group. It is replicated across all shards. + // spend authority, and allows deriving all subkeys for all accounts in the wallet. + // It is replicated across all shards. // // The spend verification key component is the `PK` in the FROST I-D. FullViewingKey *v1alpha1.FullViewingKey `protobuf:"bytes,1,opt,name=full_viewing_key,json=fullViewingKey,proto3" json:"full_viewing_key,omitempty"` - // Describes the participants in the account group. + // Describes the participants in the wallet. Participants []*ShardInfo `protobuf:"bytes,2,rep,name=participants,proto3" json:"participants,omitempty"` } -func (x *AccountGroupInfo) Reset() { - *x = AccountGroupInfo{} +func (x *WalletInfo) Reset() { + *x = WalletInfo{} if protoimpl.UnsafeEnabled { mi := &file_penumbra_narsil_ledger_v1alpha1_ledger_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -659,13 +659,13 @@ func (x *AccountGroupInfo) Reset() { } } -func (x *AccountGroupInfo) String() string { +func (x *WalletInfo) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AccountGroupInfo) ProtoMessage() {} +func (*WalletInfo) ProtoMessage() {} -func (x *AccountGroupInfo) ProtoReflect() protoreflect.Message { +func (x *WalletInfo) ProtoReflect() protoreflect.Message { mi := &file_penumbra_narsil_ledger_v1alpha1_ledger_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -677,19 +677,19 @@ func (x *AccountGroupInfo) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AccountGroupInfo.ProtoReflect.Descriptor instead. -func (*AccountGroupInfo) Descriptor() ([]byte, []int) { +// Deprecated: Use WalletInfo.ProtoReflect.Descriptor instead. +func (*WalletInfo) Descriptor() ([]byte, []int) { return file_penumbra_narsil_ledger_v1alpha1_ledger_proto_rawDescGZIP(), []int{10} } -func (x *AccountGroupInfo) GetFullViewingKey() *v1alpha1.FullViewingKey { +func (x *WalletInfo) GetFullViewingKey() *v1alpha1.FullViewingKey { if x != nil { return x.FullViewingKey } return nil } -func (x *AccountGroupInfo) GetParticipants() []*ShardInfo { +func (x *WalletInfo) GetParticipants() []*ShardInfo { if x != nil { return x.Participants } @@ -2427,7 +2427,7 @@ func (x *DkgState_StartedRound2) GetRound_2Messages() []*DkgRound2 { return nil } -// The DKG has finished successfully, producing the jointly-controlled `AccountGroupInfo`. +// The DKG has finished successfully, producing the jointly-controlled `WalletInfo`. // // Unlike the signing ceremony, we don't record a failure case here: if the DKG fails, we abort the entire ledger. type DkgState_Finished struct { @@ -2439,8 +2439,8 @@ type DkgState_Finished struct { Round_1Messages []*DkgRound1 `protobuf:"bytes,1,rep,name=round_1_messages,json=round1Messages,proto3" json:"round_1_messages,omitempty"` // A list of messages received during round 2. Round_2Messages []*DkgRound2 `protobuf:"bytes,2,rep,name=round_2_messages,json=round2Messages,proto3" json:"round_2_messages,omitempty"` - // The jointly-controlled `AccountGroupInfo` resulting from the DKG. - AccountGroupInfo *AccountGroupInfo `protobuf:"bytes,3,opt,name=account_group_info,json=accountGroupInfo,proto3" json:"account_group_info,omitempty"` + // The jointly-controlled `WalletInfo` resulting from the DKG. + WalletInfo *WalletInfo `protobuf:"bytes,3,opt,name=wallet_info,json=walletInfo,proto3" json:"wallet_info,omitempty"` } func (x *DkgState_Finished) Reset() { @@ -2489,9 +2489,9 @@ func (x *DkgState_Finished) GetRound_2Messages() []*DkgRound2 { return nil } -func (x *DkgState_Finished) GetAccountGroupInfo() *AccountGroupInfo { +func (x *DkgState_Finished) GetWalletInfo() *WalletInfo { if x != nil { - return x.AccountGroupInfo + return x.WalletInfo } return nil } @@ -2968,7 +2968,7 @@ var file_penumbra_narsil_ledger_v1alpha1_ledger_proto_goTypes = []interface{}{ (*ShardDescription)(nil), // 7: penumbra.narsil.ledger.v1alpha1.ShardDescription (*ShardOperator)(nil), // 8: penumbra.narsil.ledger.v1alpha1.ShardOperator (*GenesisData)(nil), // 9: penumbra.narsil.ledger.v1alpha1.GenesisData - (*AccountGroupInfo)(nil), // 10: penumbra.narsil.ledger.v1alpha1.AccountGroupInfo + (*WalletInfo)(nil), // 10: penumbra.narsil.ledger.v1alpha1.WalletInfo (*ShardInfo)(nil), // 11: penumbra.narsil.ledger.v1alpha1.ShardInfo (*RequestIndex)(nil), // 12: penumbra.narsil.ledger.v1alpha1.RequestIndex (*CeremonyIndex)(nil), // 13: penumbra.narsil.ledger.v1alpha1.CeremonyIndex @@ -3009,8 +3009,8 @@ var file_penumbra_narsil_ledger_v1alpha1_ledger_proto_depIdxs = []int32{ 3, // 2: penumbra.narsil.ledger.v1alpha1.ShardDescription.consensus_key:type_name -> penumbra.narsil.ledger.v1alpha1.ConsensusKey 7, // 3: penumbra.narsil.ledger.v1alpha1.ShardOperator.description:type_name -> penumbra.narsil.ledger.v1alpha1.ShardDescription 8, // 4: penumbra.narsil.ledger.v1alpha1.GenesisData.operators:type_name -> penumbra.narsil.ledger.v1alpha1.ShardOperator - 39, // 5: penumbra.narsil.ledger.v1alpha1.AccountGroupInfo.full_viewing_key:type_name -> penumbra.core.keys.v1alpha1.FullViewingKey - 11, // 6: penumbra.narsil.ledger.v1alpha1.AccountGroupInfo.participants:type_name -> penumbra.narsil.ledger.v1alpha1.ShardInfo + 39, // 5: penumbra.narsil.ledger.v1alpha1.WalletInfo.full_viewing_key:type_name -> penumbra.core.keys.v1alpha1.FullViewingKey + 11, // 6: penumbra.narsil.ledger.v1alpha1.WalletInfo.participants:type_name -> penumbra.narsil.ledger.v1alpha1.ShardInfo 40, // 7: penumbra.narsil.ledger.v1alpha1.ShardInfo.shard_verification_key:type_name -> penumbra.core.keys.v1alpha1.SpendVerificationKey 2, // 8: penumbra.narsil.ledger.v1alpha1.ShardInfo.identity_key:type_name -> penumbra.narsil.ledger.v1alpha1.ShardIdentityKey 41, // 9: penumbra.narsil.ledger.v1alpha1.RequestIndex.effect_hash:type_name -> penumbra.core.component.chain.v1alpha1.EffectHash @@ -3063,7 +3063,7 @@ var file_penumbra_narsil_ledger_v1alpha1_ledger_proto_depIdxs = []int32{ 23, // 56: penumbra.narsil.ledger.v1alpha1.DkgState.StartedRound2.round_2_messages:type_name -> penumbra.narsil.ledger.v1alpha1.DkgRound2 22, // 57: penumbra.narsil.ledger.v1alpha1.DkgState.Finished.round_1_messages:type_name -> penumbra.narsil.ledger.v1alpha1.DkgRound1 23, // 58: penumbra.narsil.ledger.v1alpha1.DkgState.Finished.round_2_messages:type_name -> penumbra.narsil.ledger.v1alpha1.DkgRound2 - 10, // 59: penumbra.narsil.ledger.v1alpha1.DkgState.Finished.account_group_info:type_name -> penumbra.narsil.ledger.v1alpha1.AccountGroupInfo + 10, // 59: penumbra.narsil.ledger.v1alpha1.DkgState.Finished.wallet_info:type_name -> penumbra.narsil.ledger.v1alpha1.WalletInfo 0, // 60: penumbra.narsil.ledger.v1alpha1.LedgerService.Info:input_type -> penumbra.narsil.ledger.v1alpha1.InfoRequest 1, // 61: penumbra.narsil.ledger.v1alpha1.LedgerService.Info:output_type -> penumbra.narsil.ledger.v1alpha1.InfoResponse 61, // [61:62] is the sub-list for method output_type @@ -3200,7 +3200,7 @@ func file_penumbra_narsil_ledger_v1alpha1_ledger_proto_init() { } } file_penumbra_narsil_ledger_v1alpha1_ledger_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AccountGroupInfo); i { + switch v := v.(*WalletInfo); i { case 0: return &v.state case 1: diff --git a/proto/go/gen/penumbra/view/v1alpha1/view.pb.go b/proto/go/gen/penumbra/view/v1alpha1/view.pb.go index e7e88d9c82..03b5f35393 100644 --- a/proto/go/gen/penumbra/view/v1alpha1/view.pb.go +++ b/proto/go/gen/penumbra/view/v1alpha1/view.pb.go @@ -267,8 +267,8 @@ type TransactionPlannerRequest struct { Memo *v1alpha1.MemoPlaintext `protobuf:"bytes,3,opt,name=memo,proto3" json:"memo,omitempty"` // If present, only spends funds from the given account. Source *v1alpha12.AddressIndex `protobuf:"bytes,4,opt,name=source,proto3" json:"source,omitempty"` - // Optionally identifies the account group to query. - AccountGroupId *v1alpha12.AccountGroupId `protobuf:"bytes,14,opt,name=account_group_id,json=accountGroupId,proto3" json:"account_group_id,omitempty"` + // Optionally identifies the wallet to query. + Wallet *v1alpha12.Wallet `protobuf:"bytes,14,opt,name=wallet,json=wallet,proto3" json:"wallet,omitempty"` // Request contents Outputs []*TransactionPlannerRequest_Output `protobuf:"bytes,20,rep,name=outputs,proto3" json:"outputs,omitempty"` Swaps []*TransactionPlannerRequest_Swap `protobuf:"bytes,30,rep,name=swaps,proto3" json:"swaps,omitempty"` @@ -341,9 +341,9 @@ func (x *TransactionPlannerRequest) GetSource() *v1alpha12.AddressIndex { return nil } -func (x *TransactionPlannerRequest) GetAccountGroupId() *v1alpha12.AccountGroupId { +func (x *TransactionPlannerRequest) GetWallet() *v1alpha12.Wallet { if x != nil { - return x.AccountGroupId + return x.Wallet } return nil } @@ -1017,8 +1017,8 @@ type StatusRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Identifies the account group to query. - AccountGroupId *v1alpha12.AccountGroupId `protobuf:"bytes,14,opt,name=account_group_id,json=accountGroupId,proto3" json:"account_group_id,omitempty"` + // Identifies the wallet to query. + Wallet *v1alpha12.Wallet `protobuf:"bytes,14,opt,name=wallet,json=wallet,proto3" json:"wallet,omitempty"` } func (x *StatusRequest) Reset() { @@ -1053,9 +1053,9 @@ func (*StatusRequest) Descriptor() ([]byte, []int) { return file_penumbra_view_v1alpha1_view_proto_rawDescGZIP(), []int{17} } -func (x *StatusRequest) GetAccountGroupId() *v1alpha12.AccountGroupId { +func (x *StatusRequest) GetWallet() *v1alpha12.Wallet { if x != nil { - return x.AccountGroupId + return x.Wallet } return nil } @@ -1124,8 +1124,8 @@ type StatusStreamRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Identifies the account group to query. - AccountGroupId *v1alpha12.AccountGroupId `protobuf:"bytes,14,opt,name=account_group_id,json=accountGroupId,proto3" json:"account_group_id,omitempty"` + // Identifies the wallet to query. + Wallet *v1alpha12.Wallet `protobuf:"bytes,14,opt,name=wallet,json=wallet,proto3" json:"wallet,omitempty"` } func (x *StatusStreamRequest) Reset() { @@ -1160,9 +1160,9 @@ func (*StatusStreamRequest) Descriptor() ([]byte, []int) { return file_penumbra_view_v1alpha1_view_proto_rawDescGZIP(), []int{19} } -func (x *StatusStreamRequest) GetAccountGroupId() *v1alpha12.AccountGroupId { +func (x *StatusStreamRequest) GetWallet() *v1alpha12.Wallet { if x != nil { - return x.AccountGroupId + return x.Wallet } return nil } @@ -1242,8 +1242,8 @@ type NotesRequest struct { // // Ignored if `asset_id` is unset or if `include_spent` is set. AmountToSpend *v1alpha15.Amount `protobuf:"bytes,6,opt,name=amount_to_spend,json=amountToSpend,proto3" json:"amount_to_spend,omitempty"` - // Identifies the account group to query. - AccountGroupId *v1alpha12.AccountGroupId `protobuf:"bytes,14,opt,name=account_group_id,json=accountGroupId,proto3" json:"account_group_id,omitempty"` + // Identifies the wallet to query. + Wallet *v1alpha12.Wallet `protobuf:"bytes,14,opt,name=wallet,json=wallet,proto3" json:"wallet,omitempty"` } func (x *NotesRequest) Reset() { @@ -1306,9 +1306,9 @@ func (x *NotesRequest) GetAmountToSpend() *v1alpha15.Amount { return nil } -func (x *NotesRequest) GetAccountGroupId() *v1alpha12.AccountGroupId { +func (x *NotesRequest) GetWallet() *v1alpha12.Wallet { if x != nil { - return x.AccountGroupId + return x.Wallet } return nil } @@ -1323,8 +1323,8 @@ type NotesForVotingRequest struct { VotableAtHeight uint64 `protobuf:"varint,1,opt,name=votable_at_height,json=votableAtHeight,proto3" json:"votable_at_height,omitempty"` // If set, only return notes with the specified asset id. AddressIndex *v1alpha12.AddressIndex `protobuf:"bytes,3,opt,name=address_index,json=addressIndex,proto3" json:"address_index,omitempty"` - // Identifies the account group to query. - AccountGroupId *v1alpha12.AccountGroupId `protobuf:"bytes,14,opt,name=account_group_id,json=accountGroupId,proto3" json:"account_group_id,omitempty"` + // Identifies the wallet to query. + Wallet *v1alpha12.Wallet `protobuf:"bytes,14,opt,name=wallet,json=wallet,proto3" json:"wallet,omitempty"` } func (x *NotesForVotingRequest) Reset() { @@ -1373,9 +1373,9 @@ func (x *NotesForVotingRequest) GetAddressIndex() *v1alpha12.AddressIndex { return nil } -func (x *NotesForVotingRequest) GetAccountGroupId() *v1alpha12.AccountGroupId { +func (x *NotesForVotingRequest) GetWallet() *v1alpha12.Wallet { if x != nil { - return x.AccountGroupId + return x.Wallet } return nil } @@ -1389,8 +1389,8 @@ type WitnessRequest struct { NoteCommitments []*v1alpha16.StateCommitment `protobuf:"bytes,2,rep,name=note_commitments,json=noteCommitments,proto3" json:"note_commitments,omitempty"` // The transaction plan to witness TransactionPlan *v1alpha1.TransactionPlan `protobuf:"bytes,3,opt,name=transaction_plan,json=transactionPlan,proto3" json:"transaction_plan,omitempty"` - // Identifies the account group to query. - AccountGroupId *v1alpha12.AccountGroupId `protobuf:"bytes,14,opt,name=account_group_id,json=accountGroupId,proto3" json:"account_group_id,omitempty"` + // Identifies the wallet to query. + Wallet *v1alpha12.Wallet `protobuf:"bytes,14,opt,name=wallet,json=wallet,proto3" json:"wallet,omitempty"` } func (x *WitnessRequest) Reset() { @@ -1439,9 +1439,9 @@ func (x *WitnessRequest) GetTransactionPlan() *v1alpha1.TransactionPlan { return nil } -func (x *WitnessRequest) GetAccountGroupId() *v1alpha12.AccountGroupId { +func (x *WitnessRequest) GetWallet() *v1alpha12.Wallet { if x != nil { - return x.AccountGroupId + return x.Wallet } return nil } @@ -1927,8 +1927,8 @@ type NoteByCommitmentRequest struct { NoteCommitment *v1alpha16.StateCommitment `protobuf:"bytes,2,opt,name=note_commitment,json=noteCommitment,proto3" json:"note_commitment,omitempty"` // If set to true, waits to return until the requested note is detected. AwaitDetection bool `protobuf:"varint,3,opt,name=await_detection,json=awaitDetection,proto3" json:"await_detection,omitempty"` - // Identifies the account group to query. - AccountGroupId *v1alpha12.AccountGroupId `protobuf:"bytes,14,opt,name=account_group_id,json=accountGroupId,proto3" json:"account_group_id,omitempty"` + // Identifies the wallet to query. + Wallet *v1alpha12.Wallet `protobuf:"bytes,14,opt,name=wallet,json=wallet,proto3" json:"wallet,omitempty"` } func (x *NoteByCommitmentRequest) Reset() { @@ -1977,9 +1977,9 @@ func (x *NoteByCommitmentRequest) GetAwaitDetection() bool { return false } -func (x *NoteByCommitmentRequest) GetAccountGroupId() *v1alpha12.AccountGroupId { +func (x *NoteByCommitmentRequest) GetWallet() *v1alpha12.Wallet { if x != nil { - return x.AccountGroupId + return x.Wallet } return nil } @@ -2039,8 +2039,8 @@ type SwapByCommitmentRequest struct { SwapCommitment *v1alpha16.StateCommitment `protobuf:"bytes,2,opt,name=swap_commitment,json=swapCommitment,proto3" json:"swap_commitment,omitempty"` // If set to true, waits to return until the requested swap is detected. AwaitDetection bool `protobuf:"varint,3,opt,name=await_detection,json=awaitDetection,proto3" json:"await_detection,omitempty"` - // Identifies the account group to query. - AccountGroupId *v1alpha12.AccountGroupId `protobuf:"bytes,14,opt,name=account_group_id,json=accountGroupId,proto3" json:"account_group_id,omitempty"` + // Identifies the wallet to query. + Wallet *v1alpha12.Wallet `protobuf:"bytes,14,opt,name=wallet,json=wallet,proto3" json:"wallet,omitempty"` } func (x *SwapByCommitmentRequest) Reset() { @@ -2089,9 +2089,9 @@ func (x *SwapByCommitmentRequest) GetAwaitDetection() bool { return false } -func (x *SwapByCommitmentRequest) GetAccountGroupId() *v1alpha12.AccountGroupId { +func (x *SwapByCommitmentRequest) GetWallet() *v1alpha12.Wallet { if x != nil { - return x.AccountGroupId + return x.Wallet } return nil } @@ -2148,8 +2148,8 @@ type UnclaimedSwapsRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Identifies the account group to query. - AccountGroupId *v1alpha12.AccountGroupId `protobuf:"bytes,1,opt,name=account_group_id,json=accountGroupId,proto3" json:"account_group_id,omitempty"` + // Identifies the wallet to query. + Wallet *v1alpha12.Wallet `protobuf:"bytes,1,opt,name=wallet,json=wallet,proto3" json:"wallet,omitempty"` } func (x *UnclaimedSwapsRequest) Reset() { @@ -2184,9 +2184,9 @@ func (*UnclaimedSwapsRequest) Descriptor() ([]byte, []int) { return file_penumbra_view_v1alpha1_view_proto_rawDescGZIP(), []int{37} } -func (x *UnclaimedSwapsRequest) GetAccountGroupId() *v1alpha12.AccountGroupId { +func (x *UnclaimedSwapsRequest) GetWallet() *v1alpha12.Wallet { if x != nil { - return x.AccountGroupId + return x.Wallet } return nil } @@ -2245,8 +2245,8 @@ type NullifierStatusRequest struct { Nullifier *v1alpha19.Nullifier `protobuf:"bytes,2,opt,name=nullifier,proto3" json:"nullifier,omitempty"` AwaitDetection bool `protobuf:"varint,3,opt,name=await_detection,json=awaitDetection,proto3" json:"await_detection,omitempty"` - // Identifies the account group to query. - AccountGroupId *v1alpha12.AccountGroupId `protobuf:"bytes,14,opt,name=account_group_id,json=accountGroupId,proto3" json:"account_group_id,omitempty"` + // Identifies the wallet to query. + Wallet *v1alpha12.Wallet `protobuf:"bytes,14,opt,name=wallet,json=wallet,proto3" json:"wallet,omitempty"` } func (x *NullifierStatusRequest) Reset() { @@ -2295,9 +2295,9 @@ func (x *NullifierStatusRequest) GetAwaitDetection() bool { return false } -func (x *NullifierStatusRequest) GetAccountGroupId() *v1alpha12.AccountGroupId { +func (x *NullifierStatusRequest) GetWallet() *v1alpha12.Wallet { if x != nil { - return x.AccountGroupId + return x.Wallet } return nil } @@ -4471,7 +4471,7 @@ var file_penumbra_view_v1alpha1_view_proto_goTypes = []interface{}{ (*v1alpha11.Fee)(nil), // 64: penumbra.core.component.fee.v1alpha1.Fee (*v1alpha1.MemoPlaintext)(nil), // 65: penumbra.core.transaction.v1alpha1.MemoPlaintext (*v1alpha12.AddressIndex)(nil), // 66: penumbra.core.keys.v1alpha1.AddressIndex - (*v1alpha12.AccountGroupId)(nil), // 67: penumbra.core.keys.v1alpha1.AccountGroupId + (*v1alpha12.Wallet)(nil), // 67: penumbra.core.keys.v1alpha1.Wallet (*v1alpha13.IbcAction)(nil), // 68: penumbra.core.component.ibc.v1alpha1.IbcAction (*v1alpha12.Address)(nil), // 69: penumbra.core.keys.v1alpha1.Address (*v1alpha14.AssetId)(nil), // 70: penumbra.core.asset.v1alpha1.AssetId @@ -4508,7 +4508,7 @@ var file_penumbra_view_v1alpha1_view_proto_depIdxs = []int32{ 64, // 5: penumbra.view.v1alpha1.TransactionPlannerRequest.fee:type_name -> penumbra.core.component.fee.v1alpha1.Fee 65, // 6: penumbra.view.v1alpha1.TransactionPlannerRequest.memo:type_name -> penumbra.core.transaction.v1alpha1.MemoPlaintext 66, // 7: penumbra.view.v1alpha1.TransactionPlannerRequest.source:type_name -> penumbra.core.keys.v1alpha1.AddressIndex - 67, // 8: penumbra.view.v1alpha1.TransactionPlannerRequest.account_group_id:type_name -> penumbra.core.keys.v1alpha1.AccountGroupId + 67, // 8: penumbra.view.v1alpha1.TransactionPlannerRequest.wallet:type_name -> penumbra.core.keys.v1alpha1.Wallet 52, // 9: penumbra.view.v1alpha1.TransactionPlannerRequest.outputs:type_name -> penumbra.view.v1alpha1.TransactionPlannerRequest.Output 53, // 10: penumbra.view.v1alpha1.TransactionPlannerRequest.swaps:type_name -> penumbra.view.v1alpha1.TransactionPlannerRequest.Swap 54, // 11: penumbra.view.v1alpha1.TransactionPlannerRequest.swap_claims:type_name -> penumbra.view.v1alpha1.TransactionPlannerRequest.SwapClaim @@ -4531,17 +4531,17 @@ var file_penumbra_view_v1alpha1_view_proto_depIdxs = []int32{ 71, // 28: penumbra.view.v1alpha1.BalancesResponse.balance:type_name -> penumbra.core.asset.v1alpha1.Value 72, // 29: penumbra.view.v1alpha1.ViewAuthRequest.fvk:type_name -> penumbra.core.keys.v1alpha1.FullViewingKey 14, // 30: penumbra.view.v1alpha1.ViewAuthResponse.token:type_name -> penumbra.view.v1alpha1.ViewAuthToken - 67, // 31: penumbra.view.v1alpha1.StatusRequest.account_group_id:type_name -> penumbra.core.keys.v1alpha1.AccountGroupId - 67, // 32: penumbra.view.v1alpha1.StatusStreamRequest.account_group_id:type_name -> penumbra.core.keys.v1alpha1.AccountGroupId + 67, // 31: penumbra.view.v1alpha1.StatusRequest.wallet:type_name -> penumbra.core.keys.v1alpha1.Wallet + 67, // 32: penumbra.view.v1alpha1.StatusStreamRequest.wallet:type_name -> penumbra.core.keys.v1alpha1.Wallet 70, // 33: penumbra.view.v1alpha1.NotesRequest.asset_id:type_name -> penumbra.core.asset.v1alpha1.AssetId 66, // 34: penumbra.view.v1alpha1.NotesRequest.address_index:type_name -> penumbra.core.keys.v1alpha1.AddressIndex 73, // 35: penumbra.view.v1alpha1.NotesRequest.amount_to_spend:type_name -> penumbra.core.num.v1alpha1.Amount - 67, // 36: penumbra.view.v1alpha1.NotesRequest.account_group_id:type_name -> penumbra.core.keys.v1alpha1.AccountGroupId + 67, // 36: penumbra.view.v1alpha1.NotesRequest.wallet:type_name -> penumbra.core.keys.v1alpha1.Wallet 66, // 37: penumbra.view.v1alpha1.NotesForVotingRequest.address_index:type_name -> penumbra.core.keys.v1alpha1.AddressIndex - 67, // 38: penumbra.view.v1alpha1.NotesForVotingRequest.account_group_id:type_name -> penumbra.core.keys.v1alpha1.AccountGroupId + 67, // 38: penumbra.view.v1alpha1.NotesForVotingRequest.wallet:type_name -> penumbra.core.keys.v1alpha1.Wallet 74, // 39: penumbra.view.v1alpha1.WitnessRequest.note_commitments:type_name -> penumbra.crypto.tct.v1alpha1.StateCommitment 60, // 40: penumbra.view.v1alpha1.WitnessRequest.transaction_plan:type_name -> penumbra.core.transaction.v1alpha1.TransactionPlan - 67, // 41: penumbra.view.v1alpha1.WitnessRequest.account_group_id:type_name -> penumbra.core.keys.v1alpha1.AccountGroupId + 67, // 41: penumbra.view.v1alpha1.WitnessRequest.wallet:type_name -> penumbra.core.keys.v1alpha1.Wallet 75, // 42: penumbra.view.v1alpha1.WitnessResponse.witness_data:type_name -> penumbra.core.transaction.v1alpha1.WitnessData 60, // 43: penumbra.view.v1alpha1.WitnessAndBuildRequest.transaction_plan:type_name -> penumbra.core.transaction.v1alpha1.TransactionPlan 61, // 44: penumbra.view.v1alpha1.WitnessAndBuildRequest.authorization_data:type_name -> penumbra.core.transaction.v1alpha1.AuthorizationData @@ -4551,15 +4551,15 @@ var file_penumbra_view_v1alpha1_view_proto_depIdxs = []int32{ 78, // 48: penumbra.view.v1alpha1.AppParametersResponse.parameters:type_name -> penumbra.core.app.v1alpha1.AppParameters 79, // 49: penumbra.view.v1alpha1.FMDParametersResponse.parameters:type_name -> penumbra.core.component.chain.v1alpha1.FmdParameters 74, // 50: penumbra.view.v1alpha1.NoteByCommitmentRequest.note_commitment:type_name -> penumbra.crypto.tct.v1alpha1.StateCommitment - 67, // 51: penumbra.view.v1alpha1.NoteByCommitmentRequest.account_group_id:type_name -> penumbra.core.keys.v1alpha1.AccountGroupId + 67, // 51: penumbra.view.v1alpha1.NoteByCommitmentRequest.wallet:type_name -> penumbra.core.keys.v1alpha1.Wallet 48, // 52: penumbra.view.v1alpha1.NoteByCommitmentResponse.spendable_note:type_name -> penumbra.view.v1alpha1.SpendableNoteRecord 74, // 53: penumbra.view.v1alpha1.SwapByCommitmentRequest.swap_commitment:type_name -> penumbra.crypto.tct.v1alpha1.StateCommitment - 67, // 54: penumbra.view.v1alpha1.SwapByCommitmentRequest.account_group_id:type_name -> penumbra.core.keys.v1alpha1.AccountGroupId + 67, // 54: penumbra.view.v1alpha1.SwapByCommitmentRequest.wallet:type_name -> penumbra.core.keys.v1alpha1.Wallet 49, // 55: penumbra.view.v1alpha1.SwapByCommitmentResponse.swap:type_name -> penumbra.view.v1alpha1.SwapRecord - 67, // 56: penumbra.view.v1alpha1.UnclaimedSwapsRequest.account_group_id:type_name -> penumbra.core.keys.v1alpha1.AccountGroupId + 67, // 56: penumbra.view.v1alpha1.UnclaimedSwapsRequest.wallet:type_name -> penumbra.core.keys.v1alpha1.Wallet 49, // 57: penumbra.view.v1alpha1.UnclaimedSwapsResponse.swap:type_name -> penumbra.view.v1alpha1.SwapRecord 80, // 58: penumbra.view.v1alpha1.NullifierStatusRequest.nullifier:type_name -> penumbra.core.component.sct.v1alpha1.Nullifier - 67, // 59: penumbra.view.v1alpha1.NullifierStatusRequest.account_group_id:type_name -> penumbra.core.keys.v1alpha1.AccountGroupId + 67, // 59: penumbra.view.v1alpha1.NullifierStatusRequest.wallet:type_name -> penumbra.core.keys.v1alpha1.Wallet 63, // 60: penumbra.view.v1alpha1.TransactionInfoByHashRequest.id:type_name -> penumbra.core.transaction.v1alpha1.Id 63, // 61: penumbra.view.v1alpha1.TransactionInfo.id:type_name -> penumbra.core.transaction.v1alpha1.Id 62, // 62: penumbra.view.v1alpha1.TransactionInfo.transaction:type_name -> penumbra.core.transaction.v1alpha1.Transaction diff --git a/proto/penumbra/penumbra/core/keys/v1alpha1/keys.proto b/proto/penumbra/penumbra/core/keys/v1alpha1/keys.proto index 10b61da7e3..60a884d6b0 100644 --- a/proto/penumbra/penumbra/core/keys/v1alpha1/keys.proto +++ b/proto/penumbra/penumbra/core/keys/v1alpha1/keys.proto @@ -4,33 +4,33 @@ package penumbra.core.keys.v1alpha1; // A Penumbra address. An address in Penumbra is a Bech32m-encoded // string, with the human-readable prefix (HRP) `penumbrav2t`. message Address { - // The bytes of the address. Must be represented as a series of - // `uint8` (i.e. values 0 through 255), with a length of 80 elements. - bytes inner = 1; + // The bytes of the address. Must be represented as a series of + // `uint8` (i.e. values 0 through 255), with a length of 80 elements. + bytes inner = 1; - // Alternatively, a Bech32m-encoded string representation of the `inner` - // bytes. - // - // NOTE: implementations are not required to support parsing this field. - // Implementations should prefer to encode the bytes in all messages they - // produce. Implementations must not accept messages with both `inner` and - // `alt_bech32m` set. - string alt_bech32m = 2; + // Alternatively, a Bech32m-encoded string representation of the `inner` + // bytes. + // + // NOTE: implementations are not required to support parsing this field. + // Implementations should prefer to encode the bytes in all messages they + // produce. Implementations must not accept messages with both `inner` and + // `alt_bech32m` set. + string alt_bech32m = 2; } message AddressView { - message Visible { - Address address = 1; - AddressIndex index = 2; - AccountGroupId account_group_id = 3; - } - message Opaque { - Address address = 1; - } - oneof address_view { - Visible visible = 1; - Opaque opaque = 2; - } + message Visible { + Address address = 1; + AddressIndex index = 2; + Wallet wallet = 3; + } + message Opaque { + Address address = 1; + } + oneof address_view { + Visible visible = 1; + Opaque opaque = 2; + } } message PayloadKey { @@ -38,28 +38,28 @@ message PayloadKey { } message SpendKey { - bytes inner = 1; + bytes inner = 1; } message SpendVerificationKey { - bytes inner = 1; + bytes inner = 1; } message FullViewingKey { - bytes inner = 1; + bytes inner = 1; } -message AccountGroupId { - bytes inner = 1; +message Wallet { + bytes inner = 1; } message Diversifier { - bytes inner = 1; + bytes inner = 1; } message AddressIndex { - uint32 account = 2; - bytes randomizer = 3; + uint32 account = 2; + bytes randomizer = 3; } // A validator's identity key (decaf377-rdsa spendauth verification key). @@ -73,5 +73,5 @@ message GovernanceKey { } message ConsensusKey { - bytes inner = 1; + bytes inner = 1; } \ No newline at end of file diff --git a/proto/penumbra/penumbra/custody/v1alpha1/custody.proto b/proto/penumbra/penumbra/custody/v1alpha1/custody.proto index 77255d6ea8..adb9e38f50 100644 --- a/proto/penumbra/penumbra/custody/v1alpha1/custody.proto +++ b/proto/penumbra/penumbra/custody/v1alpha1/custody.proto @@ -25,7 +25,7 @@ message AuthorizeRequest { // The transaction plan to authorize. core.transaction.v1alpha1.TransactionPlan plan = 1; // Identifies the FVK (and hence the spend authorization key) to use for signing. - core.keys.v1alpha1.AccountGroupId account_group_id = 2; + core.keys.v1alpha1.Wallet wallet = 2; // Optionally, pre-authorization data, if required by the custodian. // diff --git a/proto/penumbra/penumbra/narsil/ledger/v1alpha1/ledger.proto b/proto/penumbra/penumbra/narsil/ledger/v1alpha1/ledger.proto index d50056ad8c..83e43c447d 100644 --- a/proto/penumbra/penumbra/narsil/ledger/v1alpha1/ledger.proto +++ b/proto/penumbra/penumbra/narsil/ledger/v1alpha1/ledger.proto @@ -106,17 +106,17 @@ message GenesisData { uint32 threshold = 2; } -// Describes the Penumbra account group jointly controlled by the Narsil instance. -message AccountGroupInfo { +// Describes the Penumbra wallet jointly controlled by the Narsil instance. +message WalletInfo { // The full viewing key for the shared account. // // In the Penumbra key hierarchy, this is the highest-authority key below - // spend authority, and allows deriving all subkeys for all accounts in the - // account group. It is replicated across all shards. + // spend authority, and allows deriving all subkeys for all accounts in the wallet. + // It is replicated across all shards. // // The spend verification key component is the `PK` in the FROST I-D. core.keys.v1alpha1.FullViewingKey full_viewing_key = 1; - // Describes the participants in the account group. + // Describes the participants in the wallet. repeated ShardInfo participants = 2; } @@ -352,7 +352,7 @@ message DkgState { // A list of round 2 messages received so far (begins empty). repeated DkgRound2 round_2_messages = 2; } - // The DKG has finished successfully, producing the jointly-controlled `AccountGroupInfo`. + // The DKG has finished successfully, producing the jointly-controlled `WalletInfo`. // // Unlike the signing ceremony, we don't record a failure case here: if the DKG fails, we abort the entire ledger. message Finished { @@ -360,7 +360,7 @@ message DkgState { repeated DkgRound1 round_1_messages = 1; // A list of messages received during round 2. repeated DkgRound2 round_2_messages = 2; - // The jointly-controlled `AccountGroupInfo` resulting from the DKG. - AccountGroupInfo account_group_info = 3; + // The jointly-controlled `WalletInfo` resulting from the DKG. + WalletInfo wallet_info = 3; } } diff --git a/proto/penumbra/penumbra/view/v1alpha1/view.proto b/proto/penumbra/penumbra/view/v1alpha1/view.proto index 2f91409b50..7705ff7a6b 100644 --- a/proto/penumbra/penumbra/view/v1alpha1/view.proto +++ b/proto/penumbra/penumbra/view/v1alpha1/view.proto @@ -21,7 +21,7 @@ import "penumbra/core/component/stake/v1alpha1/stake.proto"; // responsible for synchronizing and scanning the public chain state with one or // more full viewing keys. // -// View protocol requests optionally include the account group ID, used to +// View protocol requests optionally include the wallet ID, used to // identify which set of data to query. service ViewProtocolService { // Get current status of chain sync @@ -61,7 +61,7 @@ service ViewProtocolService { // Query for an address given an address index rpc AddressByIndex(AddressByIndexRequest) returns (AddressByIndexResponse); - // Query for an address given an address index + // Query for an address given an address index rpc IndexByAddress(IndexByAddressRequest) returns (IndexByAddressResponse); // Query for an ephemeral address @@ -131,18 +131,18 @@ message BroadcastTransactionResponse { } message TransactionPlannerRequest { - // The expiry height for the requested TransactionPlan - uint64 expiry_height = 1; - // The fee for the requested TransactionPlan, if any. - core.component.fee.v1alpha1.Fee fee = 2; - // The memo for the requested TransactionPlan. - // The memo must be unspecified unless `outputs` is nonempty. - core.transaction.v1alpha1.MemoPlaintext memo = 3; - // If present, only spends funds from the given account. - core.keys.v1alpha1.AddressIndex source = 4; - - // Optionally identifies the account group to query. - core.keys.v1alpha1.AccountGroupId account_group_id = 14; + // The expiry height for the requested TransactionPlan + uint64 expiry_height = 1; + // The fee for the requested TransactionPlan, if any. + core.component.fee.v1alpha1.Fee fee = 2; + // The memo for the requested TransactionPlan. + // The memo must be unspecified unless `outputs` is nonempty. + core.transaction.v1alpha1.MemoPlaintext memo = 3; + // If present, only spends funds from the given account. + core.keys.v1alpha1.AddressIndex source = 4; + + // Optionally identifies the wallet to query. + core.keys.v1alpha1.Wallet wallet = 14; // Request contents repeated Output outputs = 20; @@ -269,8 +269,8 @@ service ViewAuthService { // Requests sync status of the view service. message StatusRequest { - // Identifies the account group to query. - core.keys.v1alpha1.AccountGroupId account_group_id = 14; + // Identifies the wallet to query. + core.keys.v1alpha1.Wallet wallet = 14; } // Returns the status of the view service and whether it is synchronized with the chain state. @@ -283,8 +283,8 @@ message StatusResponse { // Requests streaming updates on the sync height until the view service is synchronized. message StatusStreamRequest { - // Identifies the account group to query. - core.keys.v1alpha1.AccountGroupId account_group_id = 14; + // Identifies the wallet to query. + core.keys.v1alpha1.Wallet wallet = 14; } // A streaming sync status update @@ -312,8 +312,8 @@ message NotesRequest { // Ignored if `asset_id` is unset or if `include_spent` is set. core.num.v1alpha1.Amount amount_to_spend = 6; - // Identifies the account group to query. - core.keys.v1alpha1.AccountGroupId account_group_id = 14; + // Identifies the wallet to query. + core.keys.v1alpha1.Wallet wallet = 14; } // A query for notes to be used for voting on a proposal. @@ -324,8 +324,8 @@ message NotesForVotingRequest { // If set, only return notes with the specified asset id. core.keys.v1alpha1.AddressIndex address_index = 3; - // Identifies the account group to query. - core.keys.v1alpha1.AccountGroupId account_group_id = 14; + // Identifies the wallet to query. + core.keys.v1alpha1.Wallet wallet = 14; } message WitnessRequest { @@ -335,8 +335,8 @@ message WitnessRequest { // The transaction plan to witness core.transaction.v1alpha1.TransactionPlan transaction_plan = 3; - // Identifies the account group to query. - core.keys.v1alpha1.AccountGroupId account_group_id = 14; + // Identifies the wallet to query. + core.keys.v1alpha1.Wallet wallet = 14; } message WitnessResponse { @@ -394,8 +394,8 @@ message NoteByCommitmentRequest { crypto.tct.v1alpha1.StateCommitment note_commitment = 2; // If set to true, waits to return until the requested note is detected. bool await_detection = 3; - // Identifies the account group to query. - core.keys.v1alpha1.AccountGroupId account_group_id = 14; + // Identifies the wallet to query. + core.keys.v1alpha1.Wallet wallet = 14; } message NoteByCommitmentResponse { @@ -406,8 +406,8 @@ message SwapByCommitmentRequest { crypto.tct.v1alpha1.StateCommitment swap_commitment = 2; // If set to true, waits to return until the requested swap is detected. bool await_detection = 3; - // Identifies the account group to query. - core.keys.v1alpha1.AccountGroupId account_group_id = 14; + // Identifies the wallet to query. + core.keys.v1alpha1.Wallet wallet = 14; } message SwapByCommitmentResponse { @@ -415,8 +415,8 @@ message SwapByCommitmentResponse { } message UnclaimedSwapsRequest { - // Identifies the account group to query. - core.keys.v1alpha1.AccountGroupId account_group_id = 1; + // Identifies the wallet to query. + core.keys.v1alpha1.Wallet wallet = 1; } message UnclaimedSwapsResponse { @@ -426,8 +426,8 @@ message UnclaimedSwapsResponse { message NullifierStatusRequest { core.component.sct.v1alpha1.Nullifier nullifier = 2; bool await_detection = 3; - // Identifies the account group to query. - core.keys.v1alpha1.AccountGroupId account_group_id = 14; + // Identifies the wallet to query. + core.keys.v1alpha1.Wallet wallet = 14; } message NullifierStatusResponse { @@ -436,7 +436,7 @@ message NullifierStatusResponse { message TransactionInfoByHashRequest { // The transaction hash to query for. - core.transaction.v1alpha1.Id id = 2; + core.transaction.v1alpha1.Id id = 2; } message TransactionInfoRequest { @@ -447,24 +447,24 @@ message TransactionInfoRequest { } message TransactionInfo { - // The height the transaction was included in a block, if known. - uint64 height = 1; - // The hash of the transaction. - core.transaction.v1alpha1.Id id = 2; - // The transaction data itself. - core.transaction.v1alpha1.Transaction transaction = 3; - // The transaction perspective, as seen by this view server. - core.transaction.v1alpha1.TransactionPerspective perspective = 4; - // A precomputed transaction view of `transaction` from `perspective`, included for convenience of clients that don't have support for viewing transactions on their own. - core.transaction.v1alpha1.TransactionView view = 5; + // The height the transaction was included in a block, if known. + uint64 height = 1; + // The hash of the transaction. + core.transaction.v1alpha1.Id id = 2; + // The transaction data itself. + core.transaction.v1alpha1.Transaction transaction = 3; + // The transaction perspective, as seen by this view server. + core.transaction.v1alpha1.TransactionPerspective perspective = 4; + // A precomputed transaction view of `transaction` from `perspective`, included for convenience of clients that don't have support for viewing transactions on their own. + core.transaction.v1alpha1.TransactionView view = 5; } message TransactionInfoResponse { - TransactionInfo tx_info = 1; + TransactionInfo tx_info = 1; } message TransactionInfoByHashResponse { - TransactionInfo tx_info = 1; + TransactionInfo tx_info = 1; } message NotesResponse { @@ -507,12 +507,12 @@ message SwapRecord { } message OwnedPositionIdsRequest { - // If present, return only positions with this position state. - core.component.dex.v1alpha1.PositionState position_state = 1; - // If present, return only positions for this trading pair. - core.component.dex.v1alpha1.TradingPair trading_pair = 2; - } - - message OwnedPositionIdsResponse { - core.component.dex.v1alpha1.PositionId position_id = 1; - } + // If present, return only positions with this position state. + core.component.dex.v1alpha1.PositionState position_state = 1; + // If present, return only positions for this trading pair. + core.component.dex.v1alpha1.TradingPair trading_pair = 2; +} + +message OwnedPositionIdsResponse { + core.component.dex.v1alpha1.PositionId position_id = 1; +}