fiatjaf / nos2x

nostr signer extension
278 stars 55 forks source link

Add NIP-26 delegation token signing function #29

Closed joshr4 closed 6 months ago

joshr4 commented 1 year ago

Exposing the nostr-tools createDelegation function so that the extension can sign a delegation token using its saved private key. The parameters arg is expected to have this type https://github.com/nbd-wtf/nostr-tools/blob/master/nip26.ts#L8

type Parameters = {
  pubkey: string // the key to whom the delegation will be given
  kind: number | undefined
  until: number | undefined // delegation will only be valid until this date
  since: number | undefined // delegation will be valid from this date on
}
githubbbie commented 1 year ago

Could you rework this? thx