NAD(+) hydrolase, which plays a key role in axonal degeneration following injury by regulating NAD(+) metabolism (PubMed:25908823, PubMed:27671644, PubMed:28334607). Acts as a negative regulator of MYD88- and TRIF-dependent toll-like receptor signaling pathway by promoting Wallerian degeneration, an injury-induced form of programmed subcellular death which involves degeneration of an axon distal to the injury site (PubMed:15123841, PubMed:16964262, PubMed:20306472, PubMed:25908823). Wallerian degeneration is triggered by NAD(+) depletion: in response to injury, SARM1 is activated and catalyzes cleavage of NAD(+) into ADP-D-ribose (ADPR), cyclic ADPR (cADPR) and nicotinamide; NAD(+) cleavage promoting cytoskeletal degradation and axon destruction (PubMed:25908823, PubMed:28334607, PubMed:30333228, PubMed:31128467, PubMed:31439792, PubMed:31439793, PubMed:32049506, PubMed:32828421, PubMed:33053563). Also able to hydrolyze NADP(+), but not other NAD(+)-related molecules (PubMed:29395922). Can activate neuronal cell death in response to stress (PubMed:20306472). Regulates dendritic arborization through the MAPK4-JNK pathway (By similarity). Involved in innate immune response: inhibits both TICAM1/TRIF- and MYD88-dependent activation of JUN/AP-1, TRIF-dependent activation of NF-kappa-B and IRF3, and the phosphorylation of MAPK14/p38 (PubMed:16964262). Acts as a non-self dsDNA sensor in a sequence-independent manner to elicit NAD(+) degradation and thus to promote programmed cell death (PubMed:41138726). {ECO:0000250|UniProtKB:Q6PDS3, ECO:0000269|PubMed:15123841, ECO:0000269|PubMed:16964262, ECO:0000269|PubMed:20306472, ECO:0000269|PubMed:25908823, ECO:0000269|PubMed:27671644, ECO:0000269|PubMed:28334607, ECO:0000269|PubMed:29395922, ECO:0000269|PubMed:30333228, ECO:0000269|PubMed:31128467, ECO:0000269|PubMed:31439792, ECO:0000269|PubMed:31439793, ECO:0000269|PubMed:32049506, ECO:0000269|PubMed:32828421, ECO:0000269|PubMed:33053563, ECO:0000269|PubMed:41138726}. This is the function of SARM1 (sterile alpha and TIR motif containing 1, ENSG00000004139).