Wireguard prefix autoupdate?

I want to get wireguard IPv6 prefix/address updated if upstream router is issuing a new prefix. I don't know if and how OpenWrt is handling prefix updates from e. g. upstream routers (so far I had none but ISP is indicating the possibility). Is odhcp6c watching on prefix changes? I've spotted /lib/netifd/dhcpv6.script so far. What is the best spot to place an update script getting triggered if prefix changes?

I might be misunderstanding your question... is the IPv6 prefix/address the same as an IPv4 address? For this, you would use a DDNS service or have your own domain name. In the certificate/profile, you would use that rather than the numerical address.

Ie:

Endpoint = forum.openwrt.org:54001

Not

Endpoint = 139.59.210.197:54001

Well this is an elegant solution for the problem! But I don't want to use any DynDNS service. It is not solving the task I want to achive. I want to update the wireguard settings on the router itself. Where I have to enter IPs / prefix for the server and peers also.

Actually I'm using a script checking periodically IPv4 and IPv6 address sending me an email with current IPs and run the wireguard update script on router to change prefix for wireguard. My specific setup is like ISP Router (not bridged) --> Switch --> OpenWRT Router with wireguard. So WAN on OpenWrt is relayed.

I thought odhcpc recognises prefix changes automatically and I could add a hook for a script to update wireguard settings.