WalletRpc: restructured