expose hexToBytes and bytesToHex helpers.

This commit is contained in:
fiatjaf
2025-05-28 14:50:25 -03:00
parent 924075b803
commit 57354b9fb4
2 changed files with 3 additions and 1 deletions

View File

@@ -3,6 +3,8 @@ import type { Event } from './core.ts'
export const utf8Decoder: TextDecoder = new TextDecoder('utf-8')
export const utf8Encoder: TextEncoder = new TextEncoder()
export { bytesToHex, hexToBytes } from '@noble/hashes/utils'
export function normalizeURL(url: string): string {
try {
if (url.indexOf('://') === -1) url = 'wss://' + url