rename some files and add nip 94 widget

This commit is contained in:
Ren Amamiya
2023-08-23 15:18:59 +07:00
parent c97c685149
commit 3455eb701f
34 changed files with 145 additions and 35 deletions
+22
View File
@@ -0,0 +1,22 @@
import { create } from 'zustand';
import { createJSONStorage, persist } from 'zustand/middleware';
interface StrongholdState {
privkey: null | string;
setPrivkey: (privkey: string) => void;
}
export const useStronghold = create<StrongholdState>()(
persist(
(set) => ({
privkey: null,
setPrivkey: (privkey: string) => {
set({ privkey: privkey });
},
}),
{
name: 'stronghold',
storage: createJSONStorage(() => sessionStorage),
}
)
);