akkounts/app/services/nostr_manager_service.rb
Râu Cao c6c5d80fb4
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
WIP Persist zaps, create and send zap receipts
2024-05-09 14:31:37 +02:00

23 lines
451 B
Ruby

require "nostr"
class NostrManagerService < ApplicationService
def parse_tags(tags)
out = {}
tags.each do |tag|
out[tag[0].to_sym] = tag[1, tag.length]
end
out
end
def site_keypair
Nostr::KeyPair.new(
private_key: Nostr::PrivateKey.new(Setting.nostr_private_key),
public_key: Nostr::PublicKey.new(Setting.nostr_public_key)
)
end
def site_user
Nostr::User.new(keypair: site_keypair)
end
end