voting system with nostr added

This commit is contained in:
fsociety
2024-09-29 01:02:04 +02:00
parent a0ef037b2d
commit 354680f702
43 changed files with 3017 additions and 20688 deletions

15
resources/js/nostrApp.js Normal file
View File

@@ -0,0 +1,15 @@
export default (livewireComponent) => ({
signThisEvent: livewireComponent.entangle('signThisEvent'),
init() {
// on change of signThisEvent, call the method
this.$watch('signThisEvent', async () => {
const toBeSigned = JSON.parse(this.signThisEvent);
console.log(toBeSigned);
const signedEvent = await window.nostr.signEvent(toBeSigned);
this.$wire.call('signEvent', signedEvent);
});
},
});