feat: NIP-43
This commit is contained in:
parent
6614a615c4
commit
850d92de28
25 changed files with 1132 additions and 26 deletions
|
|
@ -493,6 +493,25 @@ export function createRelayReviewDraftEvent(
|
|||
}
|
||||
}
|
||||
|
||||
// https://github.com/nostr-protocol/nips/blob/master/43.md
|
||||
export function createJoinDraftEvent(inviteCode: string): TDraftEvent {
|
||||
return {
|
||||
kind: 28934,
|
||||
created_at: Math.floor(Date.now() / 1000),
|
||||
tags: [['claim', inviteCode], ['-']],
|
||||
content: ''
|
||||
}
|
||||
}
|
||||
|
||||
export function createLeaveDraftEvent(): TDraftEvent {
|
||||
return {
|
||||
kind: 28936,
|
||||
created_at: Math.floor(Date.now() / 1000),
|
||||
tags: [['-']],
|
||||
content: ''
|
||||
}
|
||||
}
|
||||
|
||||
function generateImetaTags(imageUrls: string[]) {
|
||||
return imageUrls
|
||||
.map((imageUrl) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue