mirror of
https://github.com/logos-blockchain/logos-execution-zone.git
synced 2026-07-01 03:19:29 +00:00
refactor(lee_core): remove the legacy free-function derivation API
This commit is contained in:
parent
d2a7b329fb
commit
23da4b4412
@ -36,23 +36,6 @@ impl PrivateAddressPlaintext {
|
||||
}
|
||||
}
|
||||
|
||||
impl AccountId {
|
||||
#[must_use]
|
||||
pub fn for_regular_private_account(
|
||||
npk: &NullifierPublicKey,
|
||||
vpk: &ViewingPublicKey,
|
||||
identifier: Identifier,
|
||||
) -> Self {
|
||||
PrivateAddressPlaintext::new(*npk, vpk.clone(), identifier).account_id()
|
||||
}
|
||||
}
|
||||
|
||||
impl From<(&NullifierPublicKey, &ViewingPublicKey, Identifier)> for AccountId {
|
||||
fn from((npk, vpk, identifier): (&NullifierPublicKey, &ViewingPublicKey, Identifier)) -> Self {
|
||||
PrivateAddressPlaintext::new(*npk, vpk.clone(), identifier).account_id()
|
||||
}
|
||||
}
|
||||
|
||||
impl AsRef<[u8]> for NullifierPublicKey {
|
||||
fn as_ref(&self) -> &[u8] {
|
||||
self.0.as_slice()
|
||||
|
||||
@ -162,17 +162,6 @@ impl AccountId {
|
||||
.pda_account_id(program_id, seed),
|
||||
}
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn for_private_pda(
|
||||
program_id: &ProgramId,
|
||||
seed: &PdaSeed,
|
||||
npk: &NullifierPublicKey,
|
||||
vpk: &ViewingPublicKey,
|
||||
identifier: Identifier,
|
||||
) -> Self {
|
||||
PrivateAddressPlaintext::new(*npk, vpk.clone(), identifier).pda_account_id(program_id, seed)
|
||||
}
|
||||
}
|
||||
|
||||
impl PrivateAddressPlaintext {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user