What's the magic key version bytes for BIP49
I'm implementing BIP49-compatible key derivation for bitcoin-s, but I'm having a hard time finding the magic version bytes to use for the extended keys.


It's prefixes are: YPUB = 0x049D7CB2 and YPRV = 0x049D7878


  Is there multiple schemes for deriving P2WPKH-nested-in-P2SH?


You are confusing the two. 77429938 that you have linked in Trezor is used to derive ypub. If you scroll down on Samourai code you will see 0x049D7CB2 for ypub which is same as 77429938 in decimal. xpub stands for extended public key and allows you to generate addresses and scan all the funds associated with them, but not spend them. ypub is exactly like an xpub, except the 'Y' denotes with certainty that this particular extended public key belongs to a wallet that is also following the BIP49 bitcoin standard. This instructs the wallet to definitely scan for P2SH(P2WPKH) addresses. There is also zpub, and that instructs the wallet to only scan for bech32 addresses that starts with bc.