taldir

Directory service to resolve wallet mailboxes by messenger addresses
Log | Files | Refs | Submodules | README | LICENSE

commit ca0966b5857f2dd2c2ca8634a7a2c7ec7b815413
parent bc7758224ea4fceba8ce04004a65fd02a3bbf00e
Author: Martin Schanzenbach <schanzen@gnunet.org>
Date:   Fri, 13 Jun 2025 22:35:58 +0200

prototype disseminator

Diffstat:
Ascripts/disseminators/taldir-disseminate-gns | 27+++++++++++++++++++++++++++
1 file changed, 27 insertions(+), 0 deletions(-)

diff --git a/scripts/disseminators/taldir-disseminate-gns b/scripts/disseminators/taldir-disseminate-gns @@ -0,0 +1,27 @@ +#!/bin/bash + +set -eu + +# This is more portable than `which' but comes with +# the caveat of not(?) properly working on busybox's ash: +existence() +{ + type "$1" >/dev/null 2>&1 +} + +# FIXME this is the salted address. Do we external clients have the salt? +HS_ADDR=$1 +URI=$2 + +#TODO we need to get the identity/expiration from config +# this will require a taler-directory-config cli tool +EGO="taldir" +RD_EXP="1d" + + +if ! existence gnunet-namestore; then + echo "gnunet-namestore not found" + exit 1 +fi + +gnunet-namestore --add --name $HS_ADDR --type TXT --expiration $RD_EXP --value "$URI"