infu/icblast

Getting the same principal each time fileIdentity is used

Closed this issue · 2 comments

Is there a way to get the same principal each time i deploy my server

let identity = fileIdentity(0);
export const principal = identity.getPrincipal().toString();

Each time I deploy my server this principal seems to be different. Ideally I would like it to be the same each time I deploy

infu commented

What do you mean by deploying a server?
It should write a file to ~/.icblast/identity.json
If it's for tests where you redeploy the whole virtual machine, perhaps you should use hashIdentity("anything")

Yep hash identity is exactly what I was looking for thank you!!