diff --git a/nip98.ts b/nip98.ts index 4fcdd39..f7a79e7 100644 --- a/nip98.ts +++ b/nip98.ts @@ -8,18 +8,6 @@ import { } from './event' import {utf8Decoder, utf8Encoder} from './utils' -enum HttpMethod { - Get = 'get', - Head = 'head', - Post = 'post' - Put = 'put' - Delete = 'delete' - Connect = 'connect' - Options = 'options' - Trace = 'trace' - Patch = 'patch' -} - const _authorizationScheme = 'Nostr ' /** @@ -31,7 +19,7 @@ const _authorizationScheme = 'Nostr ' */ export async function getToken( loginUrl: string, - httpMethod: HttpMethod | string, + httpMethod: string, sign: ( e: EventTemplate ) => Promise> | Event, @@ -39,8 +27,6 @@ export async function getToken( ): Promise { if (!loginUrl || !httpMethod) throw new Error('Missing loginUrl or httpMethod') - if (!httpMethod in HttpMethod) - throw new Error('Unknown httpMethod') const event = getBlankEvent(Kind.HttpAuth)