Re-work address
This commit is contained in:
@@ -2,7 +2,7 @@ import {verifiedSymbol} from 'nostr-tools'
|
||||
import {verifyEvent, getEventHash} from 'nostr-tools'
|
||||
import {cached, pick, now} from '@welshman/lib'
|
||||
import {Tags} from './Tags'
|
||||
import {addressFromEvent, encodeAddress} from './Address'
|
||||
import {getAddress} from './Address'
|
||||
import {isEphemeralKind, isReplaceableKind, isPlainReplaceableKind, isParameterizedReplaceableKind} from './Kinds'
|
||||
|
||||
export type EventTemplate = {
|
||||
@@ -98,8 +98,6 @@ export const hasValidSignature = cached<string, boolean, [SignedEvent]>({
|
||||
},
|
||||
})
|
||||
|
||||
export const getAddress = (e: HashedEvent) => encodeAddress(addressFromEvent(e))
|
||||
|
||||
export const getIdOrAddress = (e: HashedEvent) => isReplaceable(e) ? getAddress(e) : e.id
|
||||
|
||||
export const getIdAndAddress = (e: HashedEvent) => isReplaceable(e) ? [e.id, getAddress(e)] : [e.id]
|
||||
|
||||
Reference in New Issue
Block a user