author: akumaigorodski
linkingKey derivation for BIP-32 based wallets:
- There exists a private
hashingKeywhich is derived by userLN WALLETusingm/138'/0path. LN SERVICEfull domain name is extracted from loginLNURLand then hashed usinghmacSha256(hashingKey, full service domain name). Full domain name here means FQDN with last full-stop (aka “point”) omitted (Example: forhttps://x.y.z.com/...it would bex.y.z.com).- First 16 bytes are taken from resulting hash and then turned into a sequence of 4
Longvalues which are in turn used to derive a service-specificlinkingKeyusingm/138'/<long1>/<long2>/<long3>/<long4>path, a Scala example: