update account id domain separator

This commit is contained in:
jonesmarvin8 2026-01-22 17:53:00 -05:00
parent 8b6443aa89
commit cfebb9d8b4

View File

@ -10,7 +10,7 @@ pub struct NullifierPublicKey(pub [u8; 32]);
impl From<&NullifierPublicKey> for AccountId { impl From<&NullifierPublicKey> for AccountId {
fn from(value: &NullifierPublicKey) -> Self { fn from(value: &NullifierPublicKey) -> Self {
const PRIVATE_ACCOUNT_ID_PREFIX: &[u8; 32] = b"/NSSA/v0.2/AccountId/Private/\x00\x00\x00"; const PRIVATE_ACCOUNT_ID_PREFIX: &[u8; 32] = b"/LEE/v0.3/AccountId/Private/\x00\x00\x00\x00";
let mut bytes = [0; 64]; let mut bytes = [0; 64];
bytes[0..32].copy_from_slice(PRIVATE_ACCOUNT_ID_PREFIX); bytes[0..32].copy_from_slice(PRIVATE_ACCOUNT_ID_PREFIX);
@ -27,8 +27,10 @@ impl AsRef<[u8]> for NullifierPublicKey {
impl From<&NullifierSecretKey> for NullifierPublicKey { impl From<&NullifierSecretKey> for NullifierPublicKey {
fn from(value: &NullifierSecretKey) -> Self { fn from(value: &NullifierSecretKey) -> Self {
//TODO: adjusting
// See if this fixes the core issues
let mut bytes = Vec::new(); let mut bytes = Vec::new();
const PREFIX: &[u8; 9] = b"NSSA_keys"; const PREFIX: &[u8; 9] = b"LEE/chain";
const SUFFIX_1: &[u8; 1] = &[7]; const SUFFIX_1: &[u8; 1] = &[7];
const SUFFIX_2: &[u8; 22] = &[0; 22]; const SUFFIX_2: &[u8; 22] = &[0; 22];
bytes.extend_from_slice(PREFIX); bytes.extend_from_slice(PREFIX);