mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-08 16:28:49 +00:00
expose hexToBytes and bytesToHex helpers.
This commit is contained in:
2
utils.ts
2
utils.ts
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user