feat: translation (#389)
This commit is contained in:
parent
e2e115ebeb
commit
df9066eae0
43 changed files with 1466 additions and 47 deletions
|
|
@ -144,6 +144,22 @@ class ClientService extends EventTarget {
|
|||
return result
|
||||
}
|
||||
|
||||
async signHttpAuth(url: string, method: string, description = '') {
|
||||
if (!this.signer) {
|
||||
throw new Error('Please login first to sign the event')
|
||||
}
|
||||
const event = await this.signer?.signEvent({
|
||||
content: description,
|
||||
kind: kinds.HTTPAuth,
|
||||
created_at: dayjs().unix(),
|
||||
tags: [
|
||||
['u', url],
|
||||
['method', method]
|
||||
]
|
||||
})
|
||||
return 'Nostr ' + btoa(JSON.stringify(event))
|
||||
}
|
||||
|
||||
private generateTimelineKey(urls: string[], filter: Filter) {
|
||||
const stableFilter: any = {}
|
||||
Object.entries(filter)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue