I looked at loramac-node, the code is almost impenetrable, clearly written for experts only.
I found this thread in here;
https://www.thethingsnetwork.org/forum/t/deep-sleep-and-otaa-m328p-lmic/27199/12
But code example does not exist anymore.
The function mentioned in MCCI_LMIC is;
LMIC_getSessionKeys() which is this;
LMIC_getSessionKeys(&netid, &devaddr, nwkKey, artKey);
The LMIC version I have used so far has access to these, printed out at join;
LMIC.netid
LMIC.devaddr
LMIC.artKey
LMIC.nwkKey
Presumably stored in RAM, so you might think its not too difficult to save them to FRAM and read back, I have done a library that read\writes the various variable types and arrays to a FRAM.
However, I suspect that storing the above in FRAM is only a part of the problem, the library may well have status flags and other counters that need to be saved ?