```
- extract inbound & outbound types
```
Partial backport (2/19) of core [[https://github.com/bitcoin/bitcoin/pull/19316 | PR19316]]:
https://github.com/bitcoin/bitcoin/pull/19316/commits/26304b4100201754fb32440bec3e3b78cd3f0e6d
Depends on D8710 and D8711.