add default subscription splits

This commit is contained in:
Believethehype 2024-03-21 14:14:48 +01:00
parent 1341b7c86b
commit af74e17b2e
2 changed files with 14 additions and 7 deletions

View File

@ -218,8 +218,7 @@ def build_example_subscription(name, identifier, admin_config):
nip89info = {
"name": name,
"image": "https://image.nostr.build/b29b6ec4bf9b6184f69d33cb44862db0d90a2dd9a506532e7ba5698af7d36210.jpg",
"about": "I show notes that are currently popular, just like the free DVM, I'm also used for testing subscriptions. (beta, might break"
")",
"about": "I show notes that are currently popular, just like the free DVM, I'm also used for testing subscriptions. (beta)",
"lud16": dvm_config.LN_ADDRESS,
"encryptionSupported": True,
"cashuAccepted": True,
@ -247,10 +246,11 @@ def build_example_subscription(name, identifier, admin_config):
nip88config.AMOUNT_MONTHLY = 2000
nip88config.CONTENT = "Subscribe to the DVM for unlimited use during your subscription"
nip88config.PERK1DESC = "Unlimited requests"
nip88config.PERK2DESC = "Support NostrDVM & NostrSDK development"
nip88config.PAYMENT_VERIFIER_PUBKEY = "5b5c045ecdf66fb540bdf2049fe0ef7f1a566fa427a4fe50d400a011b65a3a7e"
admin_config.UPDATE_PROFILE = False
admin_config.REBROADCAST_NIP89 = True
admin_config.REBROADCAST_NIP89 = False
admin_config.REBROADCAST_NIP88 = False
# admin_config.FETCH_NIP88 = True

View File

@ -134,12 +134,19 @@ def nip88_announce_tier(dvm_config, client):
image_tag = Tag.parse(["image", str(dvm_config.NIP88.IMAGE)])
d_tag = Tag.parse(["d", dvm_config.NIP88.DTAG])
# may todo
zaptag1 = Tag.parse(["zap", dvm_config.PUBLIC_KEY, "wss://damus.io", "19"])
zaptag2 = Tag.parse(["zap", "", "wss://damus.io", "1"])
# zap splits. Feel free to change this for your DVM
# By default, 80% of subscription go to the current's DVM lightning address (make sure to update profile for it to work)
# 5% go to NostrDVM developers
# 5% go to NostrSDK developers
# 10% optionally go to clients that support this subscription DVM
zaptag1 = Tag.parse(["zap", dvm_config.PUBLIC_KEY, "wss://damus.io", "16"])
zaptag2 = Tag.parse(["zap", "npub1nxa4tywfz9nqp7z9zp7nr7d4nchhclsf58lcqt5y782rmf2hefjquaa6q8", "wss://damus.io", "1"]) # NostrDVM
zaptag3 = Tag.parse(["zap", "npub1drvpzev3syqt0kjrls50050uzf25gehpz9vgdw08hvex7e0vgfeq0eseet", "wss://damus.io", "1"]) # NostrSDK
zaptag4 = Tag.parse(["zap", "", "wss://damus.io", "2"]) # Client might use this for splits
p_tag = Tag.parse(["p", dvm_config.NIP88.PAYMENT_VERIFIER_PUBKEY])
tags = [title_tag, image_tag, zaptag1, zaptag2, d_tag, p_tag]
tags = [title_tag, image_tag, zaptag1, zaptag2, zaptag3, zaptag4, d_tag, p_tag]
if dvm_config.NIP88.AMOUNT_DAILY is not None:
amount_tag = Tag.parse(["amount", str(dvm_config.NIP88.AMOUNT_DAILY * 1000), "msats", "daily"])