nostr verification working

This commit is contained in:
counterweight 2025-02-12 00:44:17 +01:00
parent f42ae5fc1d
commit 19667807bb
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
8 changed files with 258 additions and 7 deletions

View file

@ -0,0 +1,27 @@
const { DataTypes } = require('sequelize');
const sequelize = require('../database');
const NostrChallengeCompleted = sequelize.define('NostrChallengeCompleted', {
uuid: {
type: DataTypes.UUID,
allowNull: false,
unique: true,
primaryKey: true
},
challenge: {
type: DataTypes.STRING,
allowNull: false
},
signed_event: {
type: DataTypes.JSONB,
allowNull: false
},
created_at: {
type: DataTypes.DATE,
allowNull: false
}
}, {
tableName: 'nostr_challenge_completed'
});
module.exports = NostrChallengeCompleted;

View file

@ -12,6 +12,10 @@ const NostrChallengeCreated = sequelize.define('NostrChallengeCreated', {
type: DataTypes.STRING,
allowNull: false
},
expires_at: {
type: DataTypes.DATE,
allowNull: false
},
created_at: {
type: DataTypes.DATE,
allowNull: false