mirror of
https://gitlab.com/pezkuwichain/pezkuwi-sdk.git
synced 2026-12-01 19:47:05 +00:00
Rewrite pezbridge-bot as notify-only, drop Noter key custody entirely
Renewing the automation key's spending allowance always needs 3-of-5 multisig approval regardless, so having this bot hold one signer's (Noter's) private key on a VPS to auto-submit one of those three signatures was never actually saving a real step - the other two signers still had to sign manually every time. Once pwap-web shipped a real multisig operations UI (and now wallet-android's Bridge screen too), the bot's only remaining job is to detect a low allowance and notify all 5 signers via Telegram - they each sign with their own wallet through one of pwap-web, pezbridge-sign.pex.mom, or the wallet app directly. Noter's mnemonic was removed from the VPS entirely (shred -u) after this rewrite was deployed and verified. Also adds gen_automation_key.rs (one-off key generation helper) and the updated systemd unit with LoadCredential removed.
This commit is contained in:
1 parent
042e1df314
commit
eb821b2ff5
6 files changed
+741
-44
No files matched your search
@@ -0,0 +1,27 @@
|
||||
use anyhow::Result;
|
||||
|
||||
fn main() -> Result<()> {
|
||||
let (pair, phrase, _) = sp_core::sr25519::Pair::generate_with_phrase(None);
|
||||
use sp_core::Pair as _;
|
||||
let public = pair.public();
|
||||
let account = sp_core::crypto::AccountId32::from(public.0);
|
||||
let ss58 = sp_core::crypto::Ss58Codec::to_ss58check_with_version(
|
||||
&account,
|
||||
sp_core::crypto::Ss58AddressFormat::custom(42),
|
||||
);
|
||||
|
||||
let out = serde_json::json!({
|
||||
"warning": "CONTAINS PRIVATE SEED PHRASE - KEEP SECURE - NOT IN GIT - NOT IN LOGS",
|
||||
"role": "usdt-bridge relayer automation key - LIMITED delegated allowance only via Assets.approve_transfer, never asset owner/admin",
|
||||
"ss58_address_pezkuwi": ss58,
|
||||
"scheme": "sr25519",
|
||||
"mnemonic": phrase,
|
||||
});
|
||||
std::fs::write("/home/myhez/res/bridge_automation_key.json", serde_json::to_string_pretty(&out)?)?;
|
||||
|
||||
println!("Generated automation key.");
|
||||
println!("Address (never the mnemonic): {}", ss58);
|
||||
println!("Saved to /home/myhez/res/bridge_automation_key.json");
|
||||
|
||||
Ok(())
|
||||
}
|
||||
Reference in new issue
Block a user