Skip to content

Latest commit

 

History

History

created-at-limit-guard

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

CreatedAt Limit Guard

A created_at limit guard plugin for nostr-relay

Usage

Install

npm install @nostr-relay/created-at-limit-guard

Basic Usage

import { CreatedAtLimitGuard } from '@nostr-relay/created-at-limit-guard';

// Create a relay instance
// ...

const createdAtLimitGuard = new CreatedAtLimitGuard({
  upperLimit: 60, // 60 seconds
});

relay.register(createdAtLimitGuard);

Options

  • upperLimit: The upper limit of the created_at field in seconds.
  • lowerLimit: The lower limit of the created_at field in seconds.

Donate

If you like this project, you can buy me a coffee :) ⚡️ codytseng@getalby.com ⚡️

License

MIT