mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-09 00:28:51 +00:00
remove browserify-cipher, use crypto.subtle for nip04.
This commit is contained in:
5
nip19.ts
5
nip19.ts
@@ -1,6 +1,8 @@
|
||||
import * as secp256k1 from '@noble/secp256k1'
|
||||
import {bech32} from 'bech32'
|
||||
|
||||
import {utf8Decoder, utf8Encoder} from './utils'
|
||||
|
||||
export type ProfilePointer = {
|
||||
pubkey: string // hex
|
||||
relays?: string[]
|
||||
@@ -11,9 +13,6 @@ export type EventPointer = {
|
||||
relays?: string[]
|
||||
}
|
||||
|
||||
let utf8Decoder = new TextDecoder('utf-8')
|
||||
let utf8Encoder = new TextEncoder()
|
||||
|
||||
export function decode(nip19: string): {
|
||||
type: string
|
||||
data: ProfilePointer | EventPointer | string
|
||||
|
||||
Reference in New Issue
Block a user