diff --git a/benchmarks.ts b/benchmarks.ts index b359ea6..d76a634 100644 --- a/benchmarks.ts +++ b/benchmarks.ts @@ -1,8 +1,8 @@ import { run, bench, group, baseline } from 'mitata' import { initNostrWasm } from 'nostr-wasm' -import { NostrEvent } from './core' -import { finalizeEvent, generateSecretKey } from './pure' -import { setNostrWasm, verifyEvent } from './wasm' +import { NostrEvent } from './core.ts' +import { finalizeEvent, generateSecretKey } from './pure.ts' +import { setNostrWasm, verifyEvent } from './wasm.ts' import { AbstractRelay } from './abstract-relay.ts' import { Relay as PureRelay } from './relay.ts' import { alwaysTrue } from './helpers.ts' diff --git a/nip11.test.ts b/nip11.test.ts index 9255749..af379c0 100644 --- a/nip11.test.ts +++ b/nip11.test.ts @@ -1,6 +1,6 @@ import { describe, test, expect } from 'bun:test' import fetch from 'node-fetch' -import { useFetchImplementation, fetchRelayInformation } from './nip11' +import { useFetchImplementation, fetchRelayInformation } from './nip11.ts' // TODO: replace with a mock describe('requesting relay as for NIP11', () => { diff --git a/nip29.ts b/nip29.ts index 4590a83..297323a 100644 --- a/nip29.ts +++ b/nip29.ts @@ -1,10 +1,10 @@ -import { AbstractSimplePool } from './abstract-pool' -import { Subscription } from './abstract-relay' -import { decode } from './nip19' -import type { Event } from './core' -import { fetchRelayInformation } from './nip11' -import { normalizeURL } from './utils' -import { AddressPointer } from './nip19' +import { AbstractSimplePool } from './abstract-pool.ts' +import { Subscription } from './abstract-relay.ts' +import { decode } from './nip19.ts' +import type { Event } from './core.ts' +import { fetchRelayInformation } from './nip11.ts' +import { normalizeURL } from './utils.ts' +import { AddressPointer } from './nip19.ts' export function subscribeRelayGroups( pool: AbstractSimplePool, diff --git a/nip47.test.ts b/nip47.test.ts index 31197f3..fc8fac1 100644 --- a/nip47.test.ts +++ b/nip47.test.ts @@ -1,6 +1,6 @@ import { describe, test, expect } from 'bun:test' import { hexToBytes } from '@noble/hashes/utils' -import { makeNwcRequestEvent, parseConnectionString } from './nip47' +import { makeNwcRequestEvent, parseConnectionString } from './nip47.ts' import { decrypt } from './nip04.ts' import { NWCWalletRequest } from './kinds.ts' diff --git a/nip49.test.ts b/nip49.test.ts index 9517f84..429b539 100644 --- a/nip49.test.ts +++ b/nip49.test.ts @@ -1,5 +1,5 @@ import { test, expect } from 'bun:test' -import { decrypt, encrypt } from './nip49' +import { decrypt, encrypt } from './nip49.ts' import { hexToBytes } from '@noble/hashes/utils' test('encrypt and decrypt', () => { diff --git a/nip49.ts b/nip49.ts index 264c191..bae1a74 100644 --- a/nip49.ts +++ b/nip49.ts @@ -1,7 +1,7 @@ import { scrypt } from '@noble/hashes/scrypt' import { xchacha20poly1305 } from '@noble/ciphers/chacha' import { concatBytes, randomBytes } from '@noble/hashes/utils' -import { Bech32MaxSize, encodeBytes } from './nip19' +import { Bech32MaxSize, encodeBytes } from './nip19.ts' import { bech32 } from '@scure/base' export function encrypt(sec: Uint8Array, password: string, logn: number = 16, ksb: 0x00 | 0x01 | 0x02 = 0x02): string { diff --git a/nip58.ts b/nip58.ts index 3ddb85e..e6e7aa4 100644 --- a/nip58.ts +++ b/nip58.ts @@ -1,9 +1,9 @@ -import { Event, EventTemplate } from './core' +import { Event, EventTemplate } from './core.ts' import { BadgeAward as BadgeAwardKind, BadgeDefinition as BadgeDefinitionKind, ProfileBadges as ProfileBadgesKind, -} from './kinds' +} from './kinds.ts' /** * Represents the structure for defining a badge within the Nostr network. diff --git a/nip75.ts b/nip75.ts index 5b07ea0..020d7b0 100644 --- a/nip75.ts +++ b/nip75.ts @@ -1,5 +1,5 @@ -import { Event, EventTemplate } from './core' -import { ZapGoal } from './kinds' +import { Event, EventTemplate } from './core.ts' +import { ZapGoal } from './kinds.ts' /** * Represents a fundraising goal in the Nostr network as defined by NIP-75. diff --git a/nip94.ts b/nip94.ts index 94bee75..6b2f9cf 100644 --- a/nip94.ts +++ b/nip94.ts @@ -1,4 +1,4 @@ -import { Event, EventTemplate } from './core' +import { Event, EventTemplate } from './core.ts' import { FileMetadata as FileMetadataKind } from './kinds.ts' /** diff --git a/nip96.ts b/nip96.ts index 4d5f25e..38cd009 100644 --- a/nip96.ts +++ b/nip96.ts @@ -1,6 +1,6 @@ import { sha256 } from '@noble/hashes/sha256' -import { EventTemplate } from './core' -import { FileServerPreference } from './kinds' +import { EventTemplate } from './core.ts' +import { FileServerPreference } from './kinds.ts' import { bytesToHex } from '@noble/hashes/utils' /** diff --git a/nip99.test.ts b/nip99.test.ts index 442cd6b..f2aa2d1 100644 --- a/nip99.test.ts +++ b/nip99.test.ts @@ -1,9 +1,9 @@ import { describe, expect, test } from 'bun:test' -import { Event } from './core' -import { ClassifiedListing, DraftClassifiedListing } from './kinds' -import { ClassifiedListingObject, generateEventTemplate, parseEvent, validateEvent } from './nip99' -import { finalizeEvent, generateSecretKey } from './pure' +import { Event } from './core.ts' +import { ClassifiedListing, DraftClassifiedListing } from './kinds.ts' +import { ClassifiedListingObject, generateEventTemplate, parseEvent, validateEvent } from './nip99.ts' +import { finalizeEvent, generateSecretKey } from './pure.ts' describe('validateEvent', () => { test('should return true for a valid classified listing event', () => { diff --git a/wasm.ts b/wasm.ts index e4c1fe6..3018dc8 100644 --- a/wasm.ts +++ b/wasm.ts @@ -1,6 +1,6 @@ import { bytesToHex } from '@noble/hashes/utils' import { Nostr as NostrWasm } from 'nostr-wasm' -import { EventTemplate, Event, Nostr, VerifiedEvent, verifiedSymbol } from './core' +import { EventTemplate, Event, Nostr, VerifiedEvent, verifiedSymbol } from './core.ts' let nw: NostrWasm